lodgeit/tests/unittest/test_urls.py
Clark Boylan 9e2d54bb5a Modernize test suite
This modernizes the lodgeit testsuite to use stestr instead of nose. The
primary reason for this is nose is not python3.10 compatible and we
would like to use newer python with lodgeit.

Change-Id: I8ae480d22bbef0258afc9d6ffd6cd820993430a1
2022-11-10 10:30:15 -08:00

28 lines
773 B
Python

from tests import BaseTestCase
class URLTestCase(BaseTestCase):
def test_get_urls(self):
rules = [
('/', 200),
('/all/', 200),
('/all/1/', 200),
('/xmlrpc/', 200),
('/json/', 200),
('/about/', 200),
('/help/', 200),
('/help/advanced/', 200),
('/help/api/', 200),
('/help/integration/', 200),
('/help/pasting/', 200),
('/language/de/', 302),
('/language/en/', 302),
]
for rule, code in rules:
resp = self.client.get(rule)
assert code == resp.status_code
def test_post_url(self):
resp = self.client.post('/')
assert 200 == resp.status_code