Using coverage, how do I test this line?
I have a simple test: class ModelTests(TestCase): def test_method(self): instance = Activity(title="Test") self.assertEqual(instance.get_approved_member_count(), 0) My problem is that coverage still shows get_approved_member_count line as NOT tested: How do I satisfy the above for coverage? To run the tests I'm using Django Nose with Coverage: TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' NOSE_ARGS = [ '--with-coverage', '--cover-html', '--cover-package=apps.users,apps.activities', ] Console: python manage.py test /Users/user/Documents/workspace/api/env/lib/python3.4/importlib/_bootstrap.py