File: foo.py

package info (click to toggle)
factory-boy 3.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 996 kB
  • sloc: python: 7,316; makefile: 107; sh: 24
file content (21 lines) | stat: -rw-r--r-- 355 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright: See the LICENSE file.

"""Helper to test circular factory dependencies."""

import factory

from . import bar as bar_mod


class Foo:
    def __init__(self, bar, x):
        self.bar = bar
        self.x = x


class FooFactory(factory.Factory):
    class Meta:
        model = Foo

    x = 42
    bar = factory.SubFactory(bar_mod.BarFactory)