Generate the fake coordinates as floats

Also, remove the misleading comment in `Location`
This commit is contained in:
Alexander Hess 2026-12-01 15:27:53 +01:00
commit 8abc93987e
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -32,8 +32,8 @@ class AddressFactory(alchemy.SQLAlchemyModelFactory):
)
# 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("pyfloat", min_value=48.845, max_value=48.865)
longitude = factory.Faker("pyfloat", min_value=2.31, max_value=2.37)
# city -> set by the `make_address` fixture as there is only one `city`
city_name = "Paris"
zip_code = factory.LazyFunction(lambda: random.randint(75001, 75020))