add a simple test to see if most url endpoints work, fix failures
This commit is contained in:
parent
053a795f7b
commit
46db573e3c
@ -6,11 +6,13 @@
|
||||
<h3>{% trans %}JSON Entrypoint{% endtrans %}</h3>
|
||||
<p>{% trans %}
|
||||
This is the entrypoint for the JSON API. If you're interested
|
||||
in using it head over to the <a href="{{ url_for('help/api') }}">API documentation</a>.
|
||||
{%- endtrans %}
|
||||
in using it head over to the {%- endtrans %}
|
||||
<a href="{{ url_for('static/help', topic='api') }}">{% trans %}API documentation{% endtrans %}</a>.
|
||||
|
||||
</p>
|
||||
<p>{% trans %}Alternatively you can also use the {% endtrans %}
|
||||
<a href="{{ url_for('xmlrpc/handle_request') }}">XMLRPC</a>{% trans %}service.
|
||||
{% endtrans %}
|
||||
</p>
|
||||
<p>{% trans %}
|
||||
Alternatively you can also use the <a href="{{ url_for('xmlrpc') }}">XMLRPC</a> service.
|
||||
{% endtrans %}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -6,11 +6,12 @@
|
||||
<h3>{% trans %}XMLRPC Entrypoint{% endtrans %}</h3>
|
||||
<p>{% trans %}
|
||||
This is the entrypoint for the XMLRPC system. If you're interested
|
||||
in using it head over to the <a href="{{ url_for('help/api') }}">API documentation</a>.
|
||||
{%- endtrans %}
|
||||
in using it head over to the {% endtrans %}
|
||||
<a href="{{ url_for('static/help', topic='api') }}">API {% trans %}documentation{%- endtrans %}</a>.
|
||||
</p>
|
||||
<p>
|
||||
{% trans %}Alternatively you can also use the {% endtrans %}
|
||||
<a href="{{ url_for('json/handle_request') }}">JSON</a>API.
|
||||
</p>
|
||||
<p>{% trans %}
|
||||
Alternatively you can also use the <a href="{{ url_for('json') }}">JSON</a> API.
|
||||
{% endtrans %}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
4
tests/__init__.py
Normal file
4
tests/__init__.py
Normal file
@ -0,0 +1,4 @@
|
||||
from alfajor import APIClient
|
||||
|
||||
client = APIClient()
|
||||
client.configure_in_scope('default')
|
9
tests/alfajor.ini
Normal file
9
tests/alfajor.ini
Normal file
@ -0,0 +1,9 @@
|
||||
[default-targets]
|
||||
default+apiclient=wsgi
|
||||
|
||||
[default]
|
||||
wsgi=wsgi
|
||||
|
||||
[default+apiclient.wsgi]
|
||||
server-entry-point = tests.utilities:foo
|
||||
base_url = http://www.localhost:5001
|
0
tests/unittest/__init__.py
Normal file
0
tests/unittest/__init__.py
Normal file
17
tests/unittest/test_urls.py
Normal file
17
tests/unittest/test_urls.py
Normal file
@ -0,0 +1,17 @@
|
||||
from tests import client
|
||||
|
||||
|
||||
def test_load_most_urls():
|
||||
rules = ['/',
|
||||
'/compare/',
|
||||
'/all/',
|
||||
'/all/1/',
|
||||
'/xmlrpc/',
|
||||
'/json/',
|
||||
'/about/',
|
||||
'/help/',
|
||||
'/help/json/',
|
||||
'/colorscheme/',
|
||||
'/language/es/']
|
||||
for rule in rules:
|
||||
client.get(rule)
|
1
tests/utilities/__init__.py
Normal file
1
tests/utilities/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .runner import foo
|
9
tests/utilities/runner.py
Normal file
9
tests/utilities/runner.py
Normal file
@ -0,0 +1,9 @@
|
||||
from werkzeug import create_environ
|
||||
from lodgeit.application import make_app
|
||||
|
||||
|
||||
foo = make_app('sqlite://', 'NONE', False, True)
|
||||
|
||||
|
||||
def setup():
|
||||
pass
|
Loading…
x
Reference in New Issue
Block a user