Permalink
Browse files

adding simple inheritance test

  • Loading branch information...
1 parent f70bcfe commit 66f0cd652bed794487e4b68bd7e1b3b3da5b3f03 Mikko Hellsing committed Oct 15, 2010
Showing with 8 additions and 0 deletions.
  1. BIN mockups_tests/mockups_test/.tests.py.swn
  2. +8 −0 mockups_tests/mockups_test/tests.py
View
BIN mockups_tests/mockups_test/.tests.py.swn
Binary file not shown.
View
8 mockups_tests/mockups_test/tests.py
@@ -15,6 +15,9 @@
class SimpleMockup(Mockup):
name = generators.StaticGenerator('foo')
+class SimpleMockupChild(SimpleMockup):
+ pass
+
class TestBasicModel(TestCase):
def assertEqualOr(self, first, second, fallback):
@@ -351,6 +354,11 @@ def test_create(self):
obj = mockups.create_one(SimpleModel)
self.assertEqual(obj.name, 'foo')
+ def test_inheritance(self):
+ a = SimpleMockup(SimpleModel).field_generators
+ b = SimpleMockupChild(SimpleModel).field_generators
+ self.assertEqual(a, b)
+
def test_overwrite_attributes(self):
mockups.register(SimpleModel, SimpleMockup)
for obj in mockups.create(

0 comments on commit 66f0cd6

Please sign in to comment.