Exemplo n.º 1
0
def test_admin_home(client):
  """Tests the /admin route."""
  with client.session_transaction() as session:
    utils.login(session)
    utils.add_permission(session, Permissions.ADMIN)
  response = client.get(flask.url_for('admin.admin_home'))
  assert response.status_code == httplib.OK
def test_run_hassle(client):
    """Tests /hassle route."""
    with client.session_transaction() as session:
        utils.login(session)
        utils.add_permission(session, Permissions.HASSLE)
    response = client.get(flask.url_for("hassle.run_hassle"))
    assert response.status_code == httplib.OK
Exemplo n.º 3
0
def test_admin_home(client):
    """Tests the /admin route."""
    with client.session_transaction() as session:
        utils.login(session)
        utils.add_permission(session, Permissions.ADMIN)
    response = client.get(flask.url_for('admin.admin_home'))
    assert response.status_code == httplib.OK
def test_run_hassle(client):
  """Tests /hassle route."""
  with client.session_transaction() as session:
    utils.login(session)
    utils.add_permission(session, Permissions.HASSLE)
  response = client.get(flask.url_for('hassle.run_hassle'))
  assert response.status_code == httplib.OK
def test_view_profile(client):
    """Tests that viewing a user works."""
    username = "******"
    with client.session_transaction() as session:
        utils.login(session)
    response = client.get(
        flask.url_for('users.view_profile', username=username))
    assert response.status_code == httplib.OK
Exemplo n.º 6
0
def test_view_profile(client):
  """Tests that viewing a user works."""
  username = "******"
  with client.session_transaction() as session:
    utils.login(session)
  response = client.get(
      flask.url_for('users.view_profile', username=username))
  assert response.status_code == httplib.OK
def test_show_memberlist(client):
    """Tests /members route."""
    with client.session_transaction() as session:
        utils.login(session)
    response = client.get(flask.url_for('users.show_memberlist'))
    assert response.status_code == httplib.OK
Exemplo n.º 8
0
def test_show_memberlist(client):
  """Tests /members route."""
  with client.session_transaction() as session:
    utils.login(session)
  response = client.get(flask.url_for('users.show_memberlist'))
  assert response.status_code == httplib.OK