diff --git a/payroll/tests/services/test_payroll.py b/payroll/tests/services/test_payroll.py index 50abf61b..082a9994 100644 --- a/payroll/tests/services/test_payroll.py +++ b/payroll/tests/services/test_payroll.py @@ -1,6 +1,6 @@ +import json from random import randrange from statistics import mean -import json import pytest from pytest_django.asserts import assertNumQueries @@ -316,7 +316,8 @@ def test_update_all_employee_pay_periods(db): # then there are 2 pay periods assert EmployeePayPeriods.objects.count() == 2 - + + def update_notes_success(self, db, client): url = "http://localhost:8000/payroll/api/888813/2024/employees/notes" response = client.post( @@ -329,19 +330,14 @@ def update_notes_success(self, db, client): ), content_type="application/json", ) - assert response.status_code == 200 + def update_notes_fail(self, db, client): url = "http://localhost:8000/payroll/api/888813/2024/employees/notes" response = client.post( url, - data=json.dumps( - { - "notes": "some notes" - } - ), + data=json.dumps({"notes": "some notes"}), content_type="application/json", ) - assert response.status_code == 400