Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add tests for the svntogit app.

  • Loading branch information...
commit 2d0201774a29f441278d5a0246575e17f838c4e2 1 parent aa45d17
Aymeric Augustin authored

Showing 1 changed file with 18 additions and 0 deletions. Show diff stats Hide diff stats

  1. 18  svntogit/tests.py
18  svntogit/tests.py
... ...
@@ -0,0 +1,18 @@
  1
+from django.test import TestCase
  2
+
  3
+class SvnToGitTests(TestCase):
  4
+    urls = 'svntogit.urls'
  5
+
  6
+    def test_redirect(self):
  7
+        response = self.client.get('/1/', follow=False)
  8
+        target = 'https://github.com/django/django/commit/d6ded0e91b'
  9
+        self.assertEquals(response.status_code, 301)
  10
+        self.assertEquals(response['Location'], target)
  11
+
  12
+    def test_redirect_empty_changeset(self):
  13
+        response = self.client.get('/7/')
  14
+        self.assertEquals(response.status_code, 404)
  15
+
  16
+    def test_redirect_non_existing_changeset(self):
  17
+        response = self.client.get('/20000/')
  18
+        self.assertEquals(response.status_code, 404)

0 notes on commit 2d02017

Please sign in to comment.
Something went wrong with that request. Please try again.