Skip to content

Commit bcbba70

Browse files
author
Johan Hermansson
committed
Remove unecessary slash in end of URL
1 parent 306aeaf commit bcbba70

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

archive_db/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def routes(**kwargs):
1818

1919
return [
2020
url(r"/api/1.0/version", VersionHandler, name="version", kwargs=kwargs),
21-
url(r"/api/1.0/upload/", UploadHandler, name="upload"),
21+
url(r"/api/1.0/upload", UploadHandler, name="upload"),
2222
url(r"/api/1.0/verifification/([\w_-]+)",
2323
VerificationHandler, name="verification", kwargs=kwargs),
2424
url(r"/api/1.0/removal/([\w_-]+)", RemovalHandler, name="removal", kwargs=kwargs)

tests/test_models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,28 +64,28 @@ def test_db_model(self):
6464

6565
def test_create_new_archive_and_upload(self):
6666
body = {"description": "test-case-1", "host": "testhost", "path": "/path/to/test/archive/"}
67-
resp = self.go("/upload/", method="POST", body=body)
67+
resp = self.go("/upload", method="POST", body=body)
6868
resp = json_decode(resp.body)
6969
self.assertEqual(resp["status"], "created")
7070
self.assertEqual(resp["upload"]["description"], body["description"])
7171

7272
def test_failing_upload(self):
7373
body = {"description": "test-case-1"} # missing params
74-
resp = self.go("/upload/", method="POST", body=body)
74+
resp = self.go("/upload", method="POST", body=body)
7575
self.assertEqual(resp.code, 400)
7676

7777
def test_create_upload_for_existing_archive(self):
7878
upload_one = 1
7979
upload_two = 2
8080

8181
body = {"description": "test-case-1", "host": "testhost", "path": "/path/to/test/archive/"}
82-
resp = self.go("/upload/", method="POST", body=body)
82+
resp = self.go("/upload", method="POST", body=body)
8383
resp = json_decode(resp.body)
8484
self.assertEqual(resp["status"], "created")
8585
self.assertEqual(resp["upload"]["description"], body["description"])
8686
self.assertEqual(resp["upload"]["id"], upload_one)
8787

88-
resp = self.go("/upload/", method="POST", body=body)
88+
resp = self.go("/upload", method="POST", body=body)
8989
resp = json_decode(resp.body)
9090
self.assertEqual(resp["status"], "created")
9191
self.assertEqual(resp["upload"]["id"], upload_two)

0 commit comments

Comments
 (0)