Exemple #1
0
 def prepare_to_change_dset_user(self):
     if not is_logged_in():
         redirect_url = url_for(".edit", dset_name=self.dset.name)
         session['redirect_url'] = redirect_url
         message = '<a href="/login/">Log in</a> to save this dataset'
         flash(Markup(message))
         session['save_new_user'] = True
Exemple #2
0
 def test_is_logged_in_when_logged_in(self):
     with self.client:
         self.client.post(url_for('users.login'),
                          data={'username': '******', 'password': '******'})
         assert is_logged_in()
Exemple #3
0
 def test_is_logged_in_when_not_logged_in(self):
     with self.app.test_request_context():
         assert not is_logged_in()