Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaapstorm committed Nov 27, 2024
1 parent 5f1b723 commit 7dacd38
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hq_superset/tests/test_hq_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from hq_superset.hq_requests import HQRequest
from hq_superset.tests.base_test import SupersetTestCase


class TestAbsoluteUrl(SupersetTestCase):

def test_absolute_url(self):
url = "/test-url"
hq_request = HQRequest(url)
self.assertEqual(
hq_request.absolute_url,
'http://127.0.0.1:8000/test-url'
)

def test_absolute_url_no_slash(self):
url = "test-url"
hq_request = HQRequest(url)
self.assertEqual(
hq_request.absolute_url,
'http://127.0.0.1:8000/test-url'
)

0 comments on commit 7dacd38

Please sign in to comment.