We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 575518b commit f33a736Copy full SHA for f33a736
1 file changed
tests/unit_tests/client/test_rest.py
@@ -65,9 +65,17 @@ def test_rest_error_code(
65
"code,content,expected_exception",
66
[
67
(200, None, None),
68
- (401, None, UnauthorisedAccessError(401, "")),
69
- (403, None, UnauthorisedAccessError(403, "")),
70
- (404, None, UnknownPlanError(404, "")),
+ (
+ 401,
+ "unauthorised access",
71
+ UnauthorisedAccessError(401, "unauthorised access"),
72
+ ),
73
+ (403, "Forbidden", UnauthorisedAccessError(403, "Forbidden")),
74
75
+ 404,
76
+ "Plan '{name}' was not recognised",
77
+ UnknownPlanError(404, "Plan '{name}' was not recognised"),
78
79
(
80
422,
81
"""{
@@ -114,6 +122,8 @@ def test_create_task_exceptions(
114
122
assert err.errors == expected_exception.errors
115
123
elif expected_exception is not None:
116
124
assert err.args[0] == code
125
+ if content is not None:
126
+ assert err.args[1] == content
117
127
118
128
119
129
def test_auth_request_functionality(
0 commit comments