Search code examples
djangounit-testingdjango-registration

django registration test fails on test_get_version


Also, what is this test for anyway?

======================================================================
FAIL: test_get_version (registration.tests.RegistrationVersionInfoTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/arnar/Documents/git/liveproject/env/local/lib/python2.7/site-packages/registration/tests/__init__.py", line 45, in test_get_version
    self.assertEqual(registration.get_version(), version_dict['expected'])
AssertionError: '1.0' != '1.0 pre-alpha'

----------------------------------------------------------------------
Ran 55 tests in 7.332s

FAILED (failures=1)

Solution

  • The purpose of the test is to check that the get_version function in the registration/__init.py module works.

    I had a quick look at the source code for get_version and the failing test (version 0.8), and it looks like a bug to me. There's a pull request about the issue on bitbucket.