Skip to content

Commit 978c550

Browse files
Reeya123HadleyKing
authored andcommitted
Update test_api_objects_drafts_publish.py
1 parent 8f04d36 commit 978c550

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/test_views/test_api_objects_drafts_publish.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env python3
22

33
'''Publish BCO Draft
4-
expecting a response status code of 200,300, 400, but receiving a 207 status code (Multi-status rsponse), which might indicate that
5-
suggesting that there are multiple operations being performed in the background as a result of the request.
6-
4+
expecting a response status code of 200,300, 400, but receiving a 404 status code (Forbidden)
75
Tests for 403(Invalid token)
86
'''
97

@@ -17,7 +15,7 @@
1715
class PublishDraftBCOTestCase(TestCase):
1816
fixtures = ['tests/fixtures/test_data']
1917
def setUp(self):
20-
fixtures = ['tests/fixtures/test_data']
18+
2119
self.client = APIClient()
2220
# Checking if the user 'bco_api_user' already exists
2321
try:
@@ -33,7 +31,7 @@ def setUp(self):
3331

3432
def test_publish_bco_success(self):
3533
# Test for Successful request to publish a draft BCO
36-
#Returns 207 instead of 200
34+
#Returns 403 instead of 200
3735

3836
data = {
3937
"POST_api_objects_drafts_publish": [
@@ -52,7 +50,7 @@ def test_publish_bco_success(self):
5250

5351
def test_publish_bco_partial_failure(self):
5452
# Some requests failed while publishing the draft BCO
55-
#Returns 207 instead of 300
53+
#Returns 403 instead of 300
5654

5755
data = {
5856
"POST_api_objects_drafts_publish": [
@@ -77,13 +75,13 @@ def test_publish_bco_partial_failure(self):
7775

7876
def test_publish_bco_bad_request(self):
7977
# Bad request: Invalid or missing data
80-
#Returns 207 instead of 400
78+
#Returns 403 instead of 400
8179

8280
data = {
8381
"POST_api_objects_drafts_publish": [
8482
{
8583
"prefix": "BCO",
86-
"draft_id": "InvalidID",
84+
#"draft_id": "InvalidID",
8785
"delete_draft": False
8886
},
8987

0 commit comments

Comments
 (0)