def test_get_query_no_OG_Full_id(self): queryDict = {} request = self.factory.get('/query/', queryDict) # print(request.__dict__) response = query(request) self.assertEqual(response.status_code, 200) # print(response.data) self.assertEqual(len(response.data), 8)
def test_post_query_og_id(self): queryDict = {'og_id': ['OG12345', 'OG12346', 'OG12347']} request = self.factory.post('/query/', data=json.dumps(queryDict), content_type='application/json') response = query(request) self.assertEqual(response.status_code, 200) self.assertEqual(len(response.data), 7)
def test_post_query_no_OG_Full_id(self): queryDict = {} request = self.factory.post('/query/', data=json.dumps(queryDict), content_type='application/json') response = query(request) self.assertEqual(response.status_code, 200) # print(response.data) self.assertEqual(len(response.data), 8)
def test_get_query_full_id(self): queryDict = { 'full_id': [ 'OG12345CFD3b', 'OG12346CFD9b', 'OG12347CFD11b', 'OG12345FFPE3b', 'OG12345LEUD3b', 'OG12346FFPE3b', 'OG12347FFPEM7', 'OG12348LEUD9b' ] } request = self.factory.get('/query/', queryDict) response = query(request) self.assertEqual(response.status_code, 200) self.assertEqual(len(response.data), 8)
def test_post_query_full_id(self): queryDict = { 'full_id': [ 'OG12345CFD3b', 'OG12346CFD9b', 'OG12347CFD11b', 'OG12345FFPE3b', 'OG12345LEUD3b', 'OG12346FFPE3b', 'OG12347FFPEM7', 'OG12348LEUD9b' ] } request = self.factory.post('/query/', data=json.dumps(queryDict), content_type='application/json') response = query(request) self.assertEqual(response.status_code, 200) self.assertEqual(len(response.data), 8)
def test_get_query_og_id(self): queryDict = {'og_id': ['OG12345', 'OG12346', 'OG12347']} request = self.factory.get('/query/', queryDict) response = query(request) self.assertEqual(response.status_code, 200) self.assertEqual(len(response.data), 7)