1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/netbox/tests/test_views.py
2020-01-30 18:08:25 -05:00

25 lines
519 B
Python

import urllib.parse
from utilities.testing import TestCase
from django.urls import reverse
class HomeViewTestCase(TestCase):
def test_home(self):
url = reverse('home')
response = self.client.get(url)
self.assertHttpStatus(response, 200)
def test_search(self):
url = reverse('search')
params = {
'q': 'foo',
}
response = self.client.get('{}?{}'.format(url, urllib.parse.urlencode(params)))
self.assertHttpStatus(response, 200)