-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStub_Github_Test.py
44 lines (23 loc) · 1.09 KB
/
Stub_Github_Test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from Stub_Github import Github_Stub
import unittest
from pretend import stub
class Testsuite(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.gh_stub_obj = Github_Stub()
cls.user1 = stub(user = 'jaitul25')
cls.user2 = stub(user = 'tanmayb123')
def testing_user_api(self) -> None:
self.gh_stub_obj.get_user_info(self.user1)
self.gh_stub_obj.get_user_info(self.user2)
def testing_user_repo_api(self) -> None:
self.gh_stub_obj.get_user_repo_info(self.user1)
self.gh_stub_obj.get_user_repo_info(self.user2)
def testing_gateway_response_check(self) -> None:
self.gh_stub_obj.gateway_response_check(self.user1)
self.gh_stub_obj.gateway_response_check(self.user2)
def testing_response_status_check(self) -> None:
self.gh_stub_obj.response_status_check(self.user1)
self.gh_stub_obj.response_status_check(self.user2)
if __name__ == '__main__':
unittest.main(exit=False, verbosity=2)