diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-05-18 15:15:45 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-05-18 15:15:45 +0200 |
commit | f2d04144167120dc8820401940172d10fdda007b (patch) | |
tree | 19c844b9c510abf22f0bc1c71d3033ada9f319d0 /tests | |
parent | 3a5709527d362a960a1a35769375412e4536839e (diff) | |
download | factory-boy-f2d04144167120dc8820401940172d10fdda007b.tar factory-boy-f2d04144167120dc8820401940172d10fdda007b.tar.gz |
Rename hidden/arg_parameters to exclude/inline_args.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_base.py | 4 | ||||
-rw-r--r-- | tests/test_using.py | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_base.py b/tests/test_base.py index d93bf29..d1df58e 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -122,8 +122,8 @@ class OptionsTests(unittest.TestCase): # Declarative attributes self.assertTrue(AbstractFactory._meta.abstract) self.assertIsNone(AbstractFactory._meta.model) - self.assertEqual((), AbstractFactory._meta.arg_parameters) - self.assertEqual((), AbstractFactory._meta.hidden_args) + self.assertEqual((), AbstractFactory._meta.inline_args) + self.assertEqual((), AbstractFactory._meta.exclude) self.assertEqual(base.CREATE_STRATEGY, AbstractFactory._meta.strategy) # Non-declarative attributes diff --git a/tests/test_using.py b/tests/test_using.py index 5486d33..e20f949 100644 --- a/tests/test_using.py +++ b/tests/test_using.py @@ -906,7 +906,7 @@ class UsingFactoryTestCase(unittest.TestCase): self.assertEqual(TestObjectFactory.alt_create(foo=1), {"foo": 1}) - def test_arg_parameters(self): + def test_inline_args(self): class TestObject(object): def __init__(self, *args, **kwargs): self.args = args @@ -915,7 +915,7 @@ class UsingFactoryTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): class Meta: model = TestObject - arg_parameters = ('x', 'y') + inline_args = ('x', 'y') x = 1 y = 2 @@ -926,7 +926,7 @@ class UsingFactoryTestCase(unittest.TestCase): self.assertEqual((42, 2), obj.args) self.assertEqual({'z': 5, 't': 4}, obj.kwargs) - def test_hidden_args(self): + def test_exclude(self): class TestObject(object): def __init__(self, *args, **kwargs): self.args = args @@ -935,7 +935,7 @@ class UsingFactoryTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): class Meta: model = TestObject - hidden_args = ('x', 'z') + exclude = ('x', 'z') x = 1 y = 2 @@ -946,7 +946,7 @@ class UsingFactoryTestCase(unittest.TestCase): self.assertEqual((), obj.args) self.assertEqual({'y': 2, 't': 4}, obj.kwargs) - def test_hidden_args_and_arg_parameters(self): + def test_exclude_and_inline_args(self): class TestObject(object): def __init__(self, *args, **kwargs): self.args = args @@ -955,8 +955,8 @@ class UsingFactoryTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): class Meta: model = TestObject - hidden_args = ('x', 'z') - arg_parameters = ('y',) + exclude = ('x', 'z') + inline_args = ('y',) x = 1 y = 2 @@ -979,7 +979,7 @@ class NonKwargParametersTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): class Meta: model = TestObject - arg_parameters = ('one', 'two',) + inline_args = ('one', 'two',) one = 1 two = 2 @@ -1005,7 +1005,7 @@ class NonKwargParametersTestCase(unittest.TestCase): class TestObjectFactory(factory.Factory): class Meta: model = TestObject - arg_parameters = ('one', 'two') + inline_args = ('one', 'two') one = 1 two = 2 |