Beispiel #1
0
 def test_table_inputs_are_accepted(self):
     tester = app.test_client(self)
     response = tester.post('/supplies',
                            data=dict(item_name="ice",
                                      reasons_for_request="need it",
                                      quantity="5"),
                            follow_redirects=True)
     self.assertTrue(response.status_code, 200)
Beispiel #2
0
 def test_index(self):
     tester = app.test_client(self)
     response = tester.get('/', content_type='html/text')
     self.assertEqual(response.status_code, 200)
Beispiel #3
0
 def test_item_can_be_viewed(self):
     tester = app.test_client(self)
     response = tester.get('/item/<id>', content_type='html/text')
     self.assertTrue(response.status_code, 200)
Beispiel #4
0
 def test_login_loads(self):
     tester = app.test_client(self)
     response = tester.post('/register',
                            data=dict(username="******", password="******"),
                            follow_redirects=True)
     self.assertTrue(response.status_code, 200)
Beispiel #5
0
 def test_register_page_loads(self):
     tester = app.test_client(self)
     response = tester.get('/', content_type='html/text')
     self.assertTrue(b'Enter your credentials bellow' in response.data)