Skip to content

Commit

Permalink
Merge pull request #133 from dwreeves/master
Browse files Browse the repository at this point in the history
Frontend updates and pytest updates
  • Loading branch information
dwreeves authored Nov 8, 2020
2 parents fb1a89a + 439bf04 commit bdbf257
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Empty file.
6 changes: 3 additions & 3 deletions flagging_site/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ul {
padding: 15px;
}

.header-logo > img {
.header-logo > a > img {
width: 260px;
min-width: 260px;
}
Expand All @@ -101,11 +101,11 @@ nav {
max-width: 80%;
}

nav > a {
nav > .nav-link {
display: flex;
align-items: center;
}
nav > a:not(:first-child) {
nav > .nav-link:not(:first-child) {
margin-left: 25px;
}

Expand Down
12 changes: 7 additions & 5 deletions flagging_site/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@
{% block header %}
<div class="logo-and-links">
<div class="header-logo">
<img src="{{ url_for('static', filename='images/crwa_logo.png') }}" />
<a href="{{ url_for('flagging.index') }}">
<img src="{{ url_for('static', filename='images/crwa_logo.png') }}" />
</a>
</div>
<nav>
<a href="{{ url_for('flagging.index') }}">Home</a>
<a href="{{ url_for('flagging.about') }}">About</a>
<a href="{{ url_for('flagging.output_model') }}">Detailed Outputs</a>
<a href="{{ url_for('flagging.api_index') }}">API</a>
<a class="nav-link" href="{{ url_for('flagging.index') }}">Home</a>
<a class="nav-link" href="{{ url_for('flagging.about') }}">About</a>
<a class="nav-link" href="{{ url_for('flagging.output_model') }}">Detailed Outputs</a>
<a class="nav-link" href="{{ url_for('flagging.api_index') }}">API</a>
</nav>
</div>
<div class="social-section">
Expand Down
12 changes: 5 additions & 7 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@
@pytest.fixture
def schema_fixture(app):
schema = schemathesis.from_wsgi('/api/flagging_api.json', app)

# Skip the model input data endpoint for test purposes.
# We do not plan on maintaining this schema.
# The following line removes the model_input_data from the schema:
schema.raw_schema['paths'].pop('/api/v1/model_input_data', None)

return schema


schema = schemathesis.from_pytest_fixture('schema_fixture')


@schema.parametrize()
# Skip the model input data endpoint for test purposes.
# We do not plan on maintaining this schema.
# The input to `endpoint=` removes the model_input_data from the schema:

@schema.parametrize(endpoint='^(?!/api/v1/model_input_data$).*$')
def test_api(case):
"""Test the API against the OpenAPI specification."""
response = case.call_wsgi()
Expand Down

0 comments on commit bdbf257

Please sign in to comment.