Green: test work, fix import script too
This commit is contained in:
parent
8c9a4d5295
commit
bbb32d55c2
|
@ -65,6 +65,8 @@ For now we only use sqlite
|
|||
|
||||
One may use `make db_clean` and `make db_fill` to feed database.
|
||||
|
||||
For debugging purposes `watch make db_reset` and `make watch_db` might be helpful in aside terminals.
|
||||
|
||||
|
||||
Toolings
|
||||
--------
|
||||
|
|
|
@ -25,11 +25,15 @@ def fill_db():
|
|||
import random
|
||||
|
||||
def _genres():
|
||||
return random.choice(["Comedy"], ["Comedy", "Drama"], [])
|
||||
return random.choice([["Comedy"], ["Comedy", "Drama"], []])
|
||||
|
||||
for _ in range(3):
|
||||
name = f"fill_db_{random.randint(1, 1000):03}"
|
||||
|
||||
out = crud.create_movie(SessionLocal(), title=name, genres=_genres())
|
||||
print(out.genres)
|
||||
|
||||
print(out.genres.copy())
|
||||
print(out.title)
|
||||
|
||||
|
||||
|
|
|
@ -269,7 +269,6 @@ class ApiTestCase(unittest.TestCase):
|
|||
== be_the_fun_in_de_funes[attribute_name]
|
||||
)
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_payload_content_in_and_out_loopback_non_primitive(self):
|
||||
be_the_fun_in_de_funes = {
|
||||
"id": 1,
|
||||
|
@ -287,7 +286,6 @@ class ApiTestCase(unittest.TestCase):
|
|||
domain_keys = sorted(
|
||||
{k for k in be_the_fun_in_de_funes if k not in ["id"]}
|
||||
) # Make it deterministic
|
||||
non_primtive = ["genres", "release_date"]
|
||||
|
||||
payload = {k: be_the_fun_in_de_funes[k] for k in domain_keys}
|
||||
response = client.post("/movies/", json=payload)
|
||||
|
|
Loading…
Reference in New Issue