Skip to content

Commit 6ef1022

Browse files
Adjusted test_api_v1_user.py to check ability to assign server certificate to user
1 parent 3b5ee68 commit 6ef1022

1 file changed

Lines changed: 7 additions & 20 deletions

File tree

tests/test_api_v1_user.py

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,7 @@ class APIUnitTestUser(unit_test_framework.APIUnitTest):
154154
"password": "changeme",
155155
"cert": "INVALID"
156156
}
157-
},
158-
{
159-
"name": "Check inability to add server certificate as a user certificate",
160-
"status": 400,
161-
"return": 5041,
162-
"server_cert": True,
163-
"payload": {
164-
"username": "another_user",
165-
"password": "changeme"
166-
}
167-
},
168-
157+
}
169158
]
170159
put_tests = [
171160
{
@@ -213,9 +202,7 @@ class APIUnitTestUser(unit_test_framework.APIUnitTest):
213202
}
214203
},
215204
{
216-
"name": "Check inability to add server certificate as a user certificate",
217-
"status": 400,
218-
"return": 5041,
205+
"name": "Check ability to add server certificate as a user certificate",
219206
"server_cert": True,
220207
"payload": {
221208
"username": "new_user",
@@ -245,11 +232,6 @@ class APIUnitTestUser(unit_test_framework.APIUnitTest):
245232
"return": 1005,
246233
"payload": {"descr": "USER_CERT"}
247234
},
248-
{
249-
"name": "Delete server certificate used for testing",
250-
"uri": "/api/v1/system/certificate",
251-
"payload": {"descr": "SERVER_CERT"}
252-
},
253235
{
254236
"name": "Delete local user",
255237
"payload": {"username": "new_user"}
@@ -275,6 +257,11 @@ class APIUnitTestUser(unit_test_framework.APIUnitTest):
275257
"uri": "/api/v1/system/certificate",
276258
"payload": {"descr": "USER_CERT"}
277259
},
260+
{
261+
"name": "Delete server certificate used for testing",
262+
"uri": "/api/v1/system/certificate",
263+
"payload": {"descr": "SERVER_CERT"}
264+
},
278265
{
279266
"name": "Delete CA used for testing",
280267
"uri": "/api/v1/system/ca",

0 commit comments

Comments
 (0)