Skip to content

Commit

Permalink
fixed e2e tests #107
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGuarnaccia5 committed Nov 8, 2023
1 parent 91c37d8 commit eead445
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/test_manufacturer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def test_create_manufacturer_with_only_mandatory_fields(test_client):
manufacturer_post = {
"name": "Manufacturer A",
"address": {
"building_number": "1",
"street_name": "Example Street",
"address_line": "1 Example Street",
"country": "United Kingdom",
"postcode": "OX1 2AB",
},
}
Expand All @@ -46,8 +46,8 @@ def test_create_manufacturer_with_only_mandatory_fields(test_client):
manufacturer = response.json()

assert manufacturer["name"] == manufacturer_post["name"]
assert manufacturer["address"]["building_number"] == manufacturer_post["address"]["building_number"]
assert manufacturer["address"]["street_name"] == manufacturer_post["address"]["street_name"]
assert manufacturer["address"]["address_line"] == manufacturer_post["address"]["address_line"]
assert manufacturer["address"]["country"] == manufacturer_post["address"]["country"]
assert manufacturer["address"]["postcode"] == manufacturer_post["address"]["postcode"]


Expand Down Expand Up @@ -208,7 +208,7 @@ def test_update(test_client):
manufacturer_patch = {
"name": "Manufacturer B",
"url": "http://test.co.uk/",
"address": {"building_number": "2"},
"address": {"address_line": "2 My Avenue"},
"telephone": "07569585584",
}
response = test_client.patch(f"/v1/manufacturers/{response.json()['id']}", json=manufacturer_patch)
Expand Down Expand Up @@ -241,7 +241,7 @@ def test_partial_address_update(test_client):

manufacturer_patch = {
"address": {
"street_name": "test",
"town": "test",
}
}
response = test_client.patch(f"/v1/manufacturers/{response.json()['id']}", json=manufacturer_patch)
Expand Down

0 comments on commit eead445

Please sign in to comment.