[Answered ]-AssetError Bound Method in unit test

2👍

Percentage is a method so you need to call it

self.assertEqual(Score.percentage, 100)

should be

self.assertEqual(Score.percentage(), 100)

Note: it still won’t work correctly though since you need to call the method on an instance of score, and call the instances score (self.score) inside of the method instead of score.

👤Sayse

Leave a comment