Use double quotes
This commit is contained in:
parent
7b32ffc599
commit
ea8f1a13e3
6 changed files with 2464 additions and 2466 deletions
|
|
@ -15,7 +15,7 @@ class AddressFactory(alchemy.SQLAlchemyModelFactory):
|
|||
|
||||
class Meta:
|
||||
model = db.Address
|
||||
sqlalchemy_get_or_create = ('id',)
|
||||
sqlalchemy_get_or_create = ("id",)
|
||||
|
||||
id = factory.Sequence(lambda num: num)
|
||||
created_at = factory.LazyFunction(utils.early_in_the_morning)
|
||||
|
|
@ -28,13 +28,13 @@ class AddressFactory(alchemy.SQLAlchemyModelFactory):
|
|||
|
||||
# Mimic a Google Maps Place ID with just random characters.
|
||||
place_id = factory.LazyFunction(
|
||||
lambda: ''.join(random.choice(string.ascii_lowercase) for _ in range(20)),
|
||||
lambda: "".join(random.choice(string.ascii_lowercase) for _ in range(20)),
|
||||
)
|
||||
|
||||
# Place the addresses somewhere in downtown Paris.
|
||||
latitude = factory.Faker('coordinate', center=48.855, radius=0.01)
|
||||
longitude = factory.Faker('coordinate', center=2.34, radius=0.03)
|
||||
latitude = factory.Faker("coordinate", center=48.855, radius=0.01)
|
||||
longitude = factory.Faker("coordinate", center=2.34, radius=0.03)
|
||||
# city -> set by the `make_address` fixture as there is only one `city`
|
||||
city_name = 'Paris'
|
||||
city_name = "Paris"
|
||||
zip_code = factory.LazyFunction(lambda: random.randint(75001, 75020))
|
||||
street = factory.Faker('street_address', locale='fr_FR')
|
||||
street = factory.Faker("street_address", locale="fr_FR")
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ class CourierFactory(alchemy.SQLAlchemyModelFactory):
|
|||
|
||||
class Meta:
|
||||
model = db.Courier
|
||||
sqlalchemy_get_or_create = ('id',)
|
||||
sqlalchemy_get_or_create = ("id",)
|
||||
|
||||
id = factory.Sequence(lambda num: num)
|
||||
created_at = factory.LazyFunction(utils.early_in_the_morning)
|
||||
vehicle = 'bicycle'
|
||||
vehicle = "bicycle"
|
||||
historic_speed = 7.89
|
||||
capacity = 100
|
||||
pay_per_hour = 750
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ class CustomerFactory(alchemy.SQLAlchemyModelFactory):
|
|||
|
||||
class Meta:
|
||||
model = db.Customer
|
||||
sqlalchemy_get_or_create = ('id',)
|
||||
sqlalchemy_get_or_create = ("id",)
|
||||
|
||||
id = factory.Sequence(lambda num: num)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
|
||||
class Meta:
|
||||
model = db.Order
|
||||
sqlalchemy_get_or_create = ('id',)
|
||||
sqlalchemy_get_or_create = ("id",)
|
||||
|
||||
class Params:
|
||||
"""Define flags that overwrite some attributes.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class ReplayedOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
|
||||
class Meta:
|
||||
model = db.ReplayedOrder
|
||||
sqlalchemy_get_or_create = ('simulation_id', 'order_id')
|
||||
sqlalchemy_get_or_create = ("simulation_id", "order_id")
|
||||
|
||||
# Generic columns
|
||||
# simulation -> set by the `make_replay_order` fixture for better control
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class RestaurantFactory(alchemy.SQLAlchemyModelFactory):
|
|||
|
||||
class Meta:
|
||||
model = db.Restaurant
|
||||
sqlalchemy_get_or_create = ('id',)
|
||||
sqlalchemy_get_or_create = ("id",)
|
||||
|
||||
id = factory.Sequence(lambda num: num)
|
||||
created_at = factory.LazyFunction(utils.early_in_the_morning)
|
||||
|
|
|
|||
Loading…
Reference in a new issue