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)
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)
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)
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)
def test_register(self): tester=app.test_client(self) responce=tester.get('/register',content_type='html/text') self.assertEqual(responce.status_code,200)