Skip to content

Commit

Permalink
adding simple inheritance test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikko Hellsing committed Oct 15, 2010
1 parent f70bcfe commit 66f0cd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Binary file modified mockups_tests/mockups_test/.tests.py.swn
Binary file not shown.
8 changes: 8 additions & 0 deletions mockups_tests/mockups_test/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
class SimpleMockup(Mockup):
name = generators.StaticGenerator('foo')

class SimpleMockupChild(SimpleMockup):
pass


class TestBasicModel(TestCase):
def assertEqualOr(self, first, second, fallback):
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 66f0cd6

Please sign in to comment.