2021-09-15 11:54:45 +02:00
|
|
|
"""Factory to create `Customers` instances."""
|
|
|
|
|
|
|
|
|
|
import factory
|
|
|
|
|
from factory import alchemy
|
|
|
|
|
|
2026-11-23 18:06:53 +01:00
|
|
|
from velofy import db
|
2021-09-15 11:54:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class CustomerFactory(alchemy.SQLAlchemyModelFactory):
|
|
|
|
|
"""Create instances of the `db.Customer` model."""
|
|
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
model = db.Customer
|
|
|
|
|
sqlalchemy_get_or_create = ("id",)
|
|
|
|
|
|
2026-11-28 02:01:12 +01:00
|
|
|
id = factory.Sequence(lambda num: num)
|