From 236db929c29be8af1b6d3e745eb2c5cc356c7b91 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Thu, 9 May 2019 14:36:34 -0400 Subject: [PATCH] Add test --- tests/unit/providers/test_factories_py2_py3.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/providers/test_factories_py2_py3.py b/tests/unit/providers/test_factories_py2_py3.py index e92b1d32..da9e5780 100644 --- a/tests/unit/providers/test_factories_py2_py3.py +++ b/tests/unit/providers/test_factories_py2_py3.py @@ -498,6 +498,14 @@ class FactoryAggregateTests(unittest.TestCase): dict(example_a=self.example_a_factory, example_b=self.example_b_factory)) + def test_deepcopy(self): + provider_copy = providers.deepcopy(self.factory_aggregate) + + self.assertIsNot(self.factory_aggregate, provider_copy) + self.assertIs(self.factory_aggregate.example_a.cls, provider_copy.example_a.cls) + self.assertIs(self.factory_aggregate.example_b.cls, provider_copy.example_b.cls) + self.assertIsInstance(provider_copy, type(self.factory_aggregate)) + def test_repr(self): self.assertEqual(repr(self.factory_aggregate), '