def test_1_address(self): with self.app as app: with app.session_transaction() as session: session['row_id'] = self.db.get_row_id() response = app.post('/sms/address', data={'Body': '120 North Ave NW Atlanta, GA'}, follow_redirects=True) self.assertEqual(flask.session['counter'], 2) self.assertEqual(response.status_code, 200)
def test_7_hole(self): with self.app as app: with app.session_transaction() as session: session['row_id'] = self.db.get_row_id() response = app.post('/sms/options', data={'Body': 'G'}, follow_redirects=True) self.assertNotIn('counter', flask.session) self.assertNotIn('mistakes', flask.session) self.assertEqual(response.status_code, 200)