Move reverse.js related code to the booking module

This commit is contained in:
2015-05-27 23:10:26 +02:00
parent 80096d72e4
commit 2ba17dd61e
5 changed files with 20 additions and 19 deletions

View File

@@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="{% static 'booking.css' %}">
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.11.2/themes/ui-lightness/jquery-ui.css">
<script src="{% url 'api:js_reverse' %}" type="text/javascript"></script>
<script src="{% url 'js_reverse' %}" type="text/javascript"></script>
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script>
</head>

View File

@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
from django.test import TestCase, Client
from django.utils import timezone
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase, Client
from django.utils import timezone
import datetime
@@ -296,3 +297,11 @@ class BookingTest(TestCase):
def test_unbooked_duck(self):
self.assertEqual(self.unbooked_duck.booked_by(), None)
class ReverseTest(TestCase):
def setUp(self):
self.client = Client()
def test_reverse_js(self):
response = self.client.get(reverse('js_reverse'))
self.assertEqual(response.status_code, 200)