summaryrefslogtreecommitdiff
path: root/svntogit
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-02-06 21:35:21 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-02-06 21:35:21 +0100
commit2d0201774a29f441278d5a0246575e17f838c4e2 (patch)
tree4c944f6645b502f6185295efaec6a8d459150b7a /svntogit
parentaa45d1777098d9f8ef89dd27a7bc2c3863395d1f (diff)
Add tests for the svntogit app.
Diffstat (limited to 'svntogit')
-rw-r--r--svntogit/tests.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/svntogit/tests.py b/svntogit/tests.py
new file mode 100644
index 00000000..e9fade83
--- /dev/null
+++ b/svntogit/tests.py
@@ -0,0 +1,18 @@
+from django.test import TestCase
+
+class SvnToGitTests(TestCase):
+ urls = 'svntogit.urls'
+
+ def test_redirect(self):
+ response = self.client.get('/1/', follow=False)
+ target = 'https://github.com/django/django/commit/d6ded0e91b'
+ self.assertEquals(response.status_code, 301)
+ self.assertEquals(response['Location'], target)
+
+ def test_redirect_empty_changeset(self):
+ response = self.client.get('/7/')
+ self.assertEquals(response.status_code, 404)
+
+ def test_redirect_non_existing_changeset(self):
+ response = self.client.get('/20000/')
+ self.assertEquals(response.status_code, 404)