Exemple #1
0
 def test_correct_login(self):
     tester=app.test_client(self)
     responce=tester.get('/login',
                         data=dict(username="******",password="******" )
                         ,follow_redirects=True)
     print(f'Passed')
     self.assertIn(b'Welcome to ProjectX',responce.data)
Exemple #2
0
 def test_compare_meta(self):
     tester=app.test_client(self)
     responce=tester.get('/api/v1/compare_meta',content_type='html/text')
     self.assertEqual(responce.status_code,200)
Exemple #3
0
 def test_category(self):
     tester=app.test_client(self)
     responce=tester.get('/api/v1/location/department/category',content_type='html/text')
     self.assertEqual(responce.status_code,200)
Exemple #4
0
 def test_location_data(self):
     tester=app.test_client(self)
     responce=tester.get('/api/v1/location/?location=Perimeter'
                         ,follow_redirects=True)
     self.assertIn(b'List of Locations',responce.data)
Exemple #5
0
 def test_register(self):
     tester=app.test_client(self)
     responce=tester.get('/register',content_type='html/text')
     self.assertEqual(responce.status_code,200)