File: __init__.py

package info (click to toggle)
python-django-dynamic-fixture 4.0.1-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 616 kB
  • sloc: python: 3,909; makefile: 237; sh: 6
file content (14 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django_dynamic_fixture.fixture_algorithms.sequential_fixture import SequentialDataFixture, StaticSequentialDataFixture
from django_dynamic_fixture.fixture_algorithms.random_fixture import RandomDataFixture


class FixtureFactory:
    @staticmethod
    def get(data_fixture):
        if data_fixture == 'static_sequential':
            return SequentialDataFixture()
        elif data_fixture == 'sequential':
            return SequentialDataFixture()
        elif data_fixture == 'random':
            return RandomDataFixture()
        return data_fixture