Anonymous avatar Anonymous committed 143431e

consistent PEP8 test method names

Comments (0)

Files changed (1)

model_utils/tests/tests.py

         self.parent = InheritParent.objects.create()
         self.child = InheritChild.objects.create()
     
-    def testParentRealType(self):
+    def test_parent_real_type(self):
         self.assertEquals(self.parent.real_type,
                           ContentType.objects.get_for_model(InheritParent))
 
-    def testChildRealType(self):
+    def test_child_real_type(self):
         self.assertEquals(self.child.real_type,
                           ContentType.objects.get_for_model(InheritChild))
 
-    def testCast(self):
+    def test_cast(self):
         obj = InheritParent.objects.get(pk=self.child.pk).cast()
         self.assertEquals(obj.__class__, InheritChild)
 
 
 class TimeStampedModelTests(TestCase):
-    def testCreated(self):
+    def test_created(self):
         t1 = TimeStamp.objects.create()
         t2 = TimeStamp.objects.create()
         self.assert_(t2.created > t1.created)
 
-    def testModified(self):
+    def test_modified(self):
         t1 = TimeStamp.objects.create()
         t2 = TimeStamp.objects.create()
         t1.save()
 
 class TimeFramedModelTests(TestCase):
 
-    def testCreated(self):
+    def test_created(self):
         now = datetime.now()
         # objects are out of the timeframe
         TimeFrame.objects.create(start=now+timedelta(days=2))
     def setUp(self):
         self.model = Status
 
-    def testCreated(self):
+    def test_created(self):
         c1 = self.model.objects.create()
         c2 = self.model.objects.create()
         self.assert_(c2.status_changed > c1.status_changed)
         self.assertEquals(self.model.active.count(), 2)
         self.assertEquals(self.model.deleted.count(), 0)
 
-    def testModification(self):
+    def test_modification(self):
         t1 = self.model.objects.create()
         date_created = t1.status_changed
         t1.status = t1.STATUS.on_hold
     def setUp(self):
         self.model = Status2
 
-    def testModification(self):
+    def test_modification(self):
         t1 = self.model.objects.create()
         date_created = t1.status_changed
         t1.status = t1.STATUS[2][0] # boring on_hold status
         for p, c, o in data:
             Post.objects.create(published=p, confirmed=c, order=o)
 
-    def testPassingKwargs(self):
+    def test_passing_kwargs(self):
         qs = Post.public.all()
         self.assertEquals([p.order for p in qs], [0, 1, 4, 5])
 
-    def testPassingQ(self):
+    def test_passing_Q(self):
         qs = Post.public_confirmed.all()
         self.assertEquals([p.order for p in qs], [0, 1])
 
-    def testOrdering(self):
+    def test_ordering(self):
         qs = Post.public_reversed.all()
         self.assertEquals([p.order for p in qs], [5, 4, 1, 0])
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.