Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removing Values class

  • Loading branch information...
commit de6c8ec4daa8d36954d336e01c92e91b65d32ef7 1 parent 1eecaa5
Mikko Hellsing authored
Showing with 0 additions and 19 deletions.
  1. +0 −7 autofixture/base.py
  2. +0 −12 autofixture_tests/autofixture_test/tests.py
View
7 autofixture/base.py
@@ -72,9 +72,6 @@ class AutoFixture(object):
class IGNORE_FIELD(object):
pass
- class Values(object):
- pass
-
overwrite_defaults = False
follow_fk = True
generate_fk = False
@@ -146,10 +143,6 @@ def __init__(self, model,
will be ignored if this parameter is set.
'''
self.model = model
- self.field_values = dict((
- (k,v) for k,v in self.Values.__dict__.items()
- if k[:2] != '__' and k[-2:] != '__' and not k.startswith('_Values__')))
- self.field_values.update(self.__class__.field_values.copy())
self.field_values.update(field_values or {})
self.constraints = constraints or []
if overwrite_defaults is not None:
View
12 autofixture_tests/autofixture_test/tests.py
@@ -18,12 +18,6 @@ class SimpleAutoFixture(AutoFixture):
}
-class BasicValueFixture(AutoFixture):
- class Values:
- chars = 'foo'
- shortchars = lambda: 'a'
-
-
class TestBasicModel(TestCase):
def assertEqualOr(self, first, second, fallback):
if first != second and not fallback:
@@ -379,12 +373,6 @@ def setUp(self):
def tearDown(self):
autofixture.helpers._registry = self.original_registry
- def test_values_class(self):
- autofixture.register(BasicModel, BasicValueFixture)
- for obj in autofixture.create(BasicModel, 10):
- self.assertEqual(obj.chars, 'foo')
- self.assertEqual(obj.shortchars, 'a')
-
class TestManagementCommand(TestCase):
def setUp(self):
Please sign in to comment.
Something went wrong with that request. Please try again.