예제 #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)
예제 #2
0
 def test_index(self):
     tester = app.test_client(self)
     response = tester.get('/', content_type='html/text')
     self.assertEqual(response.status_code, 200)
예제 #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)
예제 #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)
예제 #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)