Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removing Values class

  • Loading branch information...
commit de6c8ec4daa8d36954d336e01c92e91b65d32ef7 1 parent 1eecaa5
Mikko Hellsing authored
7 autofixture/base.py
@@ -72,9 +72,6 @@ class AutoFixture(object):
72 72 class IGNORE_FIELD(object):
73 73 pass
74 74
75   - class Values(object):
76   - pass
77   -
78 75 overwrite_defaults = False
79 76 follow_fk = True
80 77 generate_fk = False
@@ -146,10 +143,6 @@ def __init__(self, model,
146 143 will be ignored if this parameter is set.
147 144 '''
148 145 self.model = model
149   - self.field_values = dict((
150   - (k,v) for k,v in self.Values.__dict__.items()
151   - if k[:2] != '__' and k[-2:] != '__' and not k.startswith('_Values__')))
152   - self.field_values.update(self.__class__.field_values.copy())
153 146 self.field_values.update(field_values or {})
154 147 self.constraints = constraints or []
155 148 if overwrite_defaults is not None:
12 autofixture_tests/autofixture_test/tests.py
@@ -18,12 +18,6 @@ class SimpleAutoFixture(AutoFixture):
18 18 }
19 19
20 20
21   -class BasicValueFixture(AutoFixture):
22   - class Values:
23   - chars = 'foo'
24   - shortchars = lambda: 'a'
25   -
26   -
27 21 class TestBasicModel(TestCase):
28 22 def assertEqualOr(self, first, second, fallback):
29 23 if first != second and not fallback:
@@ -379,12 +373,6 @@ def setUp(self):
379 373 def tearDown(self):
380 374 autofixture.helpers._registry = self.original_registry
381 375
382   - def test_values_class(self):
383   - autofixture.register(BasicModel, BasicValueFixture)
384   - for obj in autofixture.create(BasicModel, 10):
385   - self.assertEqual(obj.chars, 'foo')
386   - self.assertEqual(obj.shortchars, 'a')
387   -
388 376
389 377 class TestManagementCommand(TestCase):
390 378 def setUp(self):

0 comments on commit de6c8ec

Please sign in to comment.
Something went wrong with that request. Please try again.