diff options
author | Thomas Goirand <thomas@goirand.fr> | 2012-10-14 13:19:59 +0000 |
---|---|---|
committer | Thomas Goirand <thomas@goirand.fr> | 2012-10-14 13:19:59 +0000 |
commit | 9836e013b4494b5e320c81ec4e3f766522639be2 (patch) | |
tree | 1bd00e12b2a24a6b06b397e57bd4ab33173e7fdb /tests/cyclic | |
parent | 7e4e7377d2c32bc9d0bff7ece456e38b71548bb3 (diff) | |
download | factory-boy-9836e013b4494b5e320c81ec4e3f766522639be2.tar factory-boy-9836e013b4494b5e320c81ec4e3f766522639be2.tar.gz |
Back to upstream version 1.1.5
Diffstat (limited to 'tests/cyclic')
-rw-r--r-- | tests/cyclic/__init__.py | 0 | ||||
-rw-r--r-- | tests/cyclic/bar.py | 37 | ||||
-rw-r--r-- | tests/cyclic/foo.py | 38 |
3 files changed, 0 insertions, 75 deletions
diff --git a/tests/cyclic/__init__.py b/tests/cyclic/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/tests/cyclic/__init__.py +++ /dev/null diff --git a/tests/cyclic/bar.py b/tests/cyclic/bar.py deleted file mode 100644 index cc90930..0000000 --- a/tests/cyclic/bar.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2011-2012 Raphaël Barrois -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -"""Helper to test circular factory dependencies.""" - -import factory - -class Bar(object): - def __init__(self, foo, y): - self.foo = foo - self.y = y - - -class BarFactory(factory.Factory): - FACTORY_FOR = Bar - - y = 13 - foo = factory.CircularSubFactory('cyclic.foo', 'FooFactory') - diff --git a/tests/cyclic/foo.py b/tests/cyclic/foo.py deleted file mode 100644 index e6f8896..0000000 --- a/tests/cyclic/foo.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2011-2012 Raphaël Barrois -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -"""Helper to test circular factory dependencies.""" - -import factory - -from cyclic import bar - -class Foo(object): - def __init__(self, bar, x): - self.bar = bar - self.x = x - - -class FooFactory(factory.Factory): - FACTORY_FOR = Foo - - x = 42 - bar = factory.SubFactory(bar.BarFactory) |