forked from grnet/pops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.py
43 lines (37 loc) · 1.79 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from django.test import TestCase
from django.test import Client
from django.core.urlresolvers import reverse
class ApiTest(TestCase):
def setUp(self):
self.client = Client()
def test_api_urls(self):
'''
Check if api urls exist
'''
response = self.client.get(reverse('api:pops'))
self.assertEqual(response.status_code, 200)
def test_import_models(self):
'''
Check if needed models exist
'''
from network.models import PeerIfces, PeerSite
def test_static(self):
'''
Check if static files exist
'''
from django.contrib.staticfiles import finders
self.assertIsNot(finders.find('pops/icons/customer-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/grnet-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/commercial-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/pin-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/core-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/access-optical-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/access-l2-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/distribution-legend.png'), None)
self.assertIsNot(finders.find('pops/icons/pass-through-thumb.png'), None)
self.assertIsNot(finders.find('pops/icons/unknown-thumb.png'), None)
self.assertIsNot(finders.find('bootstrap/js/bootstrap.js'), None)
self.assertIsNot(finders.find('pops/js/gmaps.js'), None)
self.assertIsNot(finders.find('pops/js/underscore-min.js'), None)
self.assertIsNot(finders.find('bootstrap/css/bootstrap.min.css'), None)
self.assertIsNot(finders.find('pops/css/maps.css'), None)