def setUpClass(cls): app.config["TESTING"] = True backup("/var/www/jforseth.tech/text/videos.txt") backup("/var/www/jforseth.tech/database.db") backuptree("userdata/") signup(app.test_client()) grant_access("testing", "admin")
def test_prayer_subscription(self): with app.test_client() as tester: signup(tester, parish="") login(tester) response = tester.post( "/prayer/addgroup", data=dict(group=TESTING_GROUP_SIGNUP_CODE), follow_redirects=True, ) with app.test_client() as tester: login(tester) response = tester.get("/account/testing") self.assertTrue(b"Testing" in response.data) self.assertEqual(200, response.status_code)
def setUpClass(cls): app.config["TESTING"] = True backuptree("userdata/") tester = app.test_client() signup(tester)
def test_prayer_unsubscription(self): with app.test_client() as tester: signup(tester) login(tester) tester.get('/prayer/unsubscribe_logged_in', )