My understanding of the self is that it means something like "an instance of a class that contains this method." So when the django test defaults to:
class SimpleTest(TestCase): def test_basic_addition(self):
in a sense, we pass test_basic_addition an instance of SimpleTest to which at some point the actions defined in the setUp method (if any) were applied. Supposedly, manage.py test somehow creates this instance, but I really don't understand what it is! What's going on here?
source share