Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add tests for the svntogit app.

  • Loading branch information...
commit 2d0201774a29f441278d5a0246575e17f838c4e2 1 parent aa45d17
@aaugustin aaugustin authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 svntogit/tests.py
View
18 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)
Please sign in to comment.
Something went wrong with that request. Please try again.