Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 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)