Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding simple inheritance test

  • Loading branch information...
commit 66f0cd652bed794487e4b68bd7e1b3b3da5b3f03 1 parent f70bcfe
Mikko Hellsing authored
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.
Something went wrong with that request. Please try again.