aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/test_upload.py
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-07-17 21:01:41 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-07-17 21:01:41 +0200
commit333a06478b40d2e1b0f2243745807c745005233a (patch)
tree85de8e610c32876b7e7cff487506526ead2a7992 /tests/integration/test_upload.py
parenta07ca7c0b7e567f2647d13f84db6aed201cde56c (diff)
parent69c9167911a8449fef20951abe924a1c4528545c (diff)
downloadfietsboek-333a06478b40d2e1b0f2243745807c745005233a.tar.gz
fietsboek-333a06478b40d2e1b0f2243745807c745005233a.tar.bz2
fietsboek-333a06478b40d2e1b0f2243745807c745005233a.zip
Merge branch 'multi-download'
Diffstat (limited to 'tests/integration/test_upload.py')
-rw-r--r--tests/integration/test_upload.py27
1 files changed, 1 insertions, 26 deletions
diff --git a/tests/integration/test_upload.py b/tests/integration/test_upload.py
index 651aedf..1903cbe 100644
--- a/tests/integration/test_upload.py
+++ b/tests/integration/test_upload.py
@@ -1,34 +1,9 @@
-import gzip
-from pathlib import Path
-
-import pytest
from sqlalchemy import select, func
from webtest import Upload
+from testutils import load_gpx_asset
from fietsboek import models
-
-@pytest.fixture()
-def logged_in(dbsession, testapp, route_path):
- user = models.User(email='foo@bar.com', is_verified=True)
- user.set_password("foobar")
- dbsession.add(user)
-
- login = testapp.get(route_path('login'))
- form = login.form
- form['email'] = 'foo@bar.com'
- form['password'] = 'foobar'
- response = form.submit()
- assert response.status_code == 302
-
-
-def load_gpx_asset(filename):
- asset_dir = Path(__file__).parent.parent / 'assets'
- test_file = asset_dir / filename
- with gzip.open(test_file, 'rb') as fobj:
- return fobj.read()
-
-
def test_upload_forbidden(testapp, route_path):
upload_form = testapp.get(route_path('upload'), status="4*")