Skip to content

Commit 5d35d92

Browse files
n-thumanngreenbonebot
authored andcommitted
Change: Adjust unit tests
1 parent d9b27e4 commit 5d35d92

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tests/github/api/test_branch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def test_exists(self):
9191
self.client.get.assert_awaited_once_with("/repos/foo/bar/branches/baz")
9292

9393
async def test_not_exists(self):
94-
response = create_response(is_success=False)
94+
response = create_response(is_success=False, status_code=404)
9595
self.client.get.return_value = response
9696

9797
self.assertFalse(await self.api.exists("foo/bar", "baz"))

tests/github/api/test_organizations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def test_exists(self):
157157
self.client.get.assert_awaited_once_with("/orgs/foo")
158158

159159
async def test_not_exists(self):
160-
response = create_response(is_success=False)
160+
response = create_response(is_success=False, status_code=404)
161161
self.client.get.return_value = response
162162

163163
self.assertFalse(await self.api.exists("foo"))

tests/github/api/test_pull_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ async def test_exists(self):
587587
self.client.get.assert_awaited_once_with("/repos/foo/bar/pulls/123")
588588

589589
async def test_not_exists(self):
590-
response = create_response(is_success=False)
590+
response = create_response(is_success=False, status_code=404)
591591
self.client.get.return_value = response
592592

593593
self.assertFalse(await self.api.exists("foo/bar", 123))

tests/github/api/test_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def test_exists(self):
107107
)
108108

109109
async def test_not_exists(self):
110-
response = create_response(is_success=False)
110+
response = create_response(is_success=False, status_code=404)
111111
self.client.get.return_value = response
112112

113113
self.assertFalse(await self.api.exists("foo/bar", "v1.2.3"))

0 commit comments

Comments
 (0)