Skip to content

Commit 1985b8d

Browse files
Ross PerryRoss Perry
Ross Perry
authored and
Ross Perry
committed
fix tests
1 parent ee0ef23 commit 1985b8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

seed/tests/test_inventory_groups.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ def test_group_constraints(self):
9898
url = reverse_lazy("api:v3:inventory_groups-list") + f"?organization_id={self.org.id}"
9999
data = {"name": "test1", "organization": self.org.id, "access_level_instance": self.org.root.id, "inventory_type": "Property"}
100100
response = self.client.post(url, data=json.dumps(data), content_type="application/json")
101+
101102
assert response.status_code == 400
102103
response = response.json()
103-
assert response == {"status": "error", "message": {"non_field_errors": ["The fields name, organization must make a unique set."]}}
104+
assert response == {"non_field_errors": ["The fields name, organization must make a unique set."]}
104105

105106
data["name"] = "test3"
106107
response = self.client.post(url, data=json.dumps(data), content_type="application/json")
@@ -111,7 +112,7 @@ def test_group_constraints(self):
111112

112113
assert response.status_code == 400
113114
response = response.json()
114-
assert response == {"status": "error", "message": {"non_field_errors": ["The fields name, organization must make a unique set."]}}
115+
assert response == {"non_field_errors": ["The fields name, organization must make a unique set."]}
115116

116117
def test_group_mapping_constraints(self):
117118
self.property_factory = FakePropertyFactory(organization=self.org)

0 commit comments

Comments
 (0)