Commit graph velofy/tests/db/test_restaurants.py
Author SHA1 Message Date
c1f04c65aa
Count rows with select() in the tests
`Session.query()` is the legacy API in SQLAlchemy 2.x.
2026-12-01 23:17:57 +01:00
e30b3efbe8
Use the sa alias for sqlalchemy everywhere
`sa` is the common alias, also in SQLAlchemy's own documentation
2026-11-30 14:18:05 +01:00
ea8f1a13e3
Use double quotes 2026-11-28 03:26:13 +01:00
dbdce83067
Upgrade black 2026-11-25 10:30:47 +01:00
4855209392
Rename the urban_meal_delivery package into velofy 2026-11-23 18:06:53 +01:00
9196c88ed4
Remove pylint from the project 2021-01-09 17:47:45 +01:00
78dba23d5d
Re-factor the ORM tests to use randomized fake data
- create `*Factory` classes with fakerboy and faker that generate
  randomized instances of the ORM models
- add new pytest marker: "db" are the integration tests involving the
  database whereas "e2e" will be all other integration tests
- streamline the docstrings in the ORM models
2020-12-29 15:40:32 +01:00
fdcc93a1ea
Add an ORM layer
- use SQLAlchemy (and PostgreSQL) to model the ORM layer
- add the following models:
  + Address => modelling all kinds of addresses
  + City => model the three target cities
  + Courier => model the UDP's couriers
  + Customer => model the UDP's customers
  + Order => model the orders received by the UDP
  + Restaurant => model the restaurants active on the UDP
- so far, the emphasis lies on expression the Foreign Key
  and Check Constraints that are used to validate the assumptions
  inherent to the cleanded data
- provide database-independent unit tests with 100% coverage
- provide additional integration tests ("e2e") that commit data to
  a PostgreSQL instance to validate that the constraints work
- adapt linting rules a bit
2020-08-11 10:28:17 +02:00