Skip to content

Commit abe9636

Browse files
committed
fix: Fixed failing test
1 parent ad709dc commit abe9636

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

shedpi_hub_dashboard/tests/unit/test_endpoints.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import pytest
44
from rest_framework import status
5-
from rest_framework.exceptions import ValidationError
65
from rest_framework.reverse import reverse
76

87
from shedpi_hub_dashboard.models import DeviceModuleReading
@@ -98,8 +97,9 @@ def test_device_module_readings_list_pagination_no_module_supplied(client):
9897

9998
url = reverse("devicemodulereading-paginated-list")
10099

101-
with pytest.raises(ValidationError):
102-
client.get(url)
100+
response = client.get(url)
101+
assert response.status_code == status.HTTP_400_BAD_REQUEST
102+
assert response.content == b'{"device_module":"Not supplied"}'
103103

104104

105105
@pytest.mark.django_db

0 commit comments

Comments
 (0)