示例#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
示例#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
示例#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
示例#8
0
def test_government(client):
  """Tests the /government route."""
  response = client.get(flask.url_for('government.government_home'))
  assert response.status_code == httplib.OK
def test_government(client):
    """Tests the /government route."""
    response = client.get(flask.url_for('government.government_home'))
    assert response.status_code == httplib.OK
示例#10
0
def test_contact(client):
  """Tests the /contact route."""
  response = client.get(flask.url_for('show_contact'))
  assert response.status_code == httplib.OK
示例#11
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
示例#12
0
def test_contact(client):
    """Tests the /contact route."""
    response = client.get(flask.url_for('show_contact'))
    assert response.status_code == httplib.OK