summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormar77i <mar77i@protonmail.ch>2020-01-15 20:44:15 +0100
committermar77i <mar77i@protonmail.ch>2020-01-15 20:44:15 +0100
commit21f56d7275426d5ca35e1b94a22284bdbb0f91ef (patch)
tree0d260d950dd0d101fe7c19f19087a10583c86810
parent37f786673500b2f7e1cdd77714ffc5c851f88698 (diff)
shorturl was never what this was about, anyway
-rwxr-xr-xmanage.sh2
-rwxr-xr-xshortcut/api.py (renamed from shorturl/api.py)0
-rw-r--r--tests.py6
3 files changed, 4 insertions, 4 deletions
diff --git a/manage.sh b/manage.sh
index 5eee356..99f4a0a 100755
--- a/manage.sh
+++ b/manage.sh
@@ -121,7 +121,7 @@ case "${1}" in
run_tests "${@:2}"
;;
serve)
- gunicorn --reload shorturl.api:api
+ gunicorn --reload shortcut.api:api
;;
-h|--help)
usage "${BASH_SOURCE[0]}"
diff --git a/shorturl/api.py b/shortcut/api.py
index 4d4875e..4d4875e 100755
--- a/shorturl/api.py
+++ b/shortcut/api.py
diff --git a/tests.py b/tests.py
index 05bc151..af50e80 100644
--- a/tests.py
+++ b/tests.py
@@ -1,10 +1,10 @@
from falcon.testing import TestCase
import json
from unittest.mock import patch
-from shorturl.api import api
+from shortcut.api import api
-class ShortUrlTest(TestCase):
+class ShortcutTest(TestCase):
def setUp(self):
super().setUp()
self.app = api
@@ -14,7 +14,7 @@ class ShortUrlTest(TestCase):
result = json.loads(self.simulate_get('/test').content.decode())
self.assertEqual(result["title"], "Resource not found")
- @patch('shorturl.api.URLResolver.conn')
+ @patch('shortcut.api.URLResolver.conn')
def test_success(self, mock_conn):
expected_url = "https://example.com/destination"
mock_conn.cursor().fetchone.side_effect = lambda: (