Skip to content

Commit

Permalink
Optimised unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaykay12 committed May 5, 2020
1 parent 2440d2c commit bd7f207
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions service/tests/test_resource_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ class TESTS_RESOURCE_ACCESS(unittest.TestCase):
def setUpClass(self):
authapp.config['TESTING'] = True
self.app = authapp.test_client()
userinfo = { "id": "75656", "username": "jalaz.kumar", "password": "jalaz" }
headers = { 'Content-Type': 'application/json'}
response = self.app.post('/api/users', headers = headers, json=userinfo)

@classmethod
def tearDownClass(self):
pass

def setUp(self):
userinfo = { "id": "75656", "username": "jalaz.kumar", "password": "jalaz" }
headers = { 'Content-Type': 'application/json'}
response = self.app.post('/api/users', headers = headers, json=userinfo)
pass

def tearDown(self):
pass
Expand Down
7 changes: 4 additions & 3 deletions service/tests/test_token_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ class TESTS_TOKEN_CREATION(unittest.TestCase):
def setUpClass(self):
authapp.config['TESTING'] = True
self.app = authapp.test_client()
userinfo = { "id": "75654", "username": "jalaz.kumar", "password": "jalaz" }
headers = { 'Content-Type': 'application/json'}
response = self.app.post('/api/users', headers = headers, json=userinfo)

@classmethod
def tearDownClass(self):
pass

def setUp(self):
userinfo = { "id": "75654", "username": "jalaz.kumar", "password": "jalaz" }
headers = { 'Content-Type': 'application/json'}
response = self.app.post('/api/users', headers = headers, json=userinfo)
pass

def tearDown(self):
pass
Expand Down
7 changes: 4 additions & 3 deletions service/tests/test_user_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ class TEST_USER_ACCESS(unittest.TestCase):
def setUpClass(self):
authapp.config['TESTING'] = True
self.app = authapp.test_client()
userinfo = { "id": "75654", "username": "jalaz.kumar", "password": "jalaz" }
headers = { 'Content-Type': 'application/json'}
response = self.app.post('/api/users', headers = headers, json=userinfo)

@classmethod
def tearDownClass(self):
pass

def setUp(self):
userinfo = { "id": "75654", "username": "jalaz.kumar", "password": "jalaz" }
headers = { 'Content-Type': 'application/json'}
response = self.app.post('/api/users', headers = headers, json=userinfo)
pass

def tearDown(self):
pass
Expand Down

0 comments on commit bd7f207

Please sign in to comment.