~bigkevmcd/django-bzrviews/trunk

« back to all changes in this revision

Viewing changes to bzrviews/tests/test_views.py

  • Committer: Kevin McDermott
  • Date: 2014-01-13 12:55:26 UTC
  • Revision ID: kevin@canonical.com-20140113125526-4kz277iyrg4vfl8l
Initial bootstrap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2013 Canonical Ltd.
 
2
from django.core.urlresolvers import reverse
 
3
from django.conf import settings
 
4
settings.configure()
 
5
 
 
6
from django.test import TestCase
 
7
 
 
8
import mocker
 
9
 
 
10
from bzrviews.helpers import get_bzr_revision
 
11
 
 
12
 
 
13
 
 
14
class BzrViewsTestCase(TestCase):
 
15
 
 
16
    def test_get_bzr_revno(self):
 
17
        """
 
18
        If we get the bzr revno view, we should get the version of the software
 
19
        in use on the server.
 
20
        """
 
21
        response = self.client.get(reverse("bzr_revno"))
 
22
        self.assertEqual(200, response.status_code)
 
23
        self.assertEqual(str(get_bzr_revision()), response.content)