1
2
3
4
5
6
7
8
9
    def _log_in_test_user(self, test_creds):
        # log in user.
        res_login = self.testapp.get(
            "/join-or-log-in?email={}&raw-otp={}".format(*test_creds)
        )
        # attach csrf to class.
        res_csrf = self.testapp.get("/")
        self.csrf = res_csrf.form.fields["csrf_token"][0].value
        return res_login