Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Fix broken tests #32

Closed
pconerly opened this issue Aug 16, 2014 · 3 comments
Closed

Fix broken tests #32

pconerly opened this issue Aug 16, 2014 · 3 comments

Comments

@pconerly
Copy link
Contributor

So this kinda sucks, tox breaks right now. Some of it is on simple stuff, like a dictionary that was ordered differently, but some of the errors seem to come from a change in FlatPage structure.

(smuggler)[peterconerly@django-smuggler]$ tox
GLOB sdist-make: /Users/peterconerly/code/django-smuggler/setup.py
py25-1.2 create: /Users/peterconerly/code/django-smuggler/.tox/py25-1.2
ERROR: UnsupportedInterpreter: python2.5 is not supported anymore, sorry
py25-1.3 create: /Users/peterconerly/code/django-smuggler/.tox/py25-1.3
ERROR: UnsupportedInterpreter: python2.5 is not supported anymore, sorry
py26-1.3 inst-nodeps: /Users/peterconerly/code/django-smuggler/.tox/dist/django-smuggler-0.4.1.zip
py26-1.3 runtests: PYTHONHASHSEED='3745116371'
py26-1.3 runtests: commands[0] | python tests/run_tests.py
Creating test database for alias 'default'...
FFF.
======================================================================
FAIL: test_serialize_exclude (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 33, in test_serialize_exclude
    self.assertEquals(out, '[ %s ]' % self.FLATPAGE_DUMP)
AssertionError: '[ { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

======================================================================
FAIL: test_serialize_include (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 39, in test_serialize_include
    self.assertEquals(out, '[ %s ]' % self.SITE_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } } ]'

======================================================================
FAIL: test_serialize_to_response (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 27, in test_serialize_to_response
    self.assertEquals(out, self.BASIC_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 }, { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } }, { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

----------------------------------------------------------------------
Ran 4 tests in 0.007s

FAILED (failures=3)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/Users/peterconerly/code/django-smuggler/.tox/py26-1.3/bin/python tests/run_tests.py'
py26-1.4 inst-nodeps: /Users/peterconerly/code/django-smuggler/.tox/dist/django-smuggler-0.4.1.zip
py26-1.4 runtests: PYTHONHASHSEED='3745116371'
py26-1.4 runtests: commands[0] | python tests/run_tests.py
Creating test database for alias 'default'...
FFF.
======================================================================
FAIL: test_serialize_exclude (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 33, in test_serialize_exclude
    self.assertEquals(out, '[ %s ]' % self.FLATPAGE_DUMP)
AssertionError: '[ { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

======================================================================
FAIL: test_serialize_include (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 39, in test_serialize_include
    self.assertEquals(out, '[ %s ]' % self.SITE_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } } ]'

======================================================================
FAIL: test_serialize_to_response (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 27, in test_serialize_to_response
    self.assertEquals(out, self.BASIC_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 }, { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } }, { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

----------------------------------------------------------------------
Ran 4 tests in 0.006s

FAILED (failures=3)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/Users/peterconerly/code/django-smuggler/.tox/py26-1.4/bin/python tests/run_tests.py'
py26-1.5 inst-nodeps: /Users/peterconerly/code/django-smuggler/.tox/dist/django-smuggler-0.4.1.zip
py26-1.5 runtests: PYTHONHASHSEED='3745116371'
py26-1.5 runtests: commands[0] | python tests/run_tests.py
Creating test database for alias 'default'...
FFF.
======================================================================
FAIL: test_serialize_exclude (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 33, in test_serialize_exclude
    self.assertEquals(out, '[ %s ]' % self.FLATPAGE_DUMP)
AssertionError: '[ { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

======================================================================
FAIL: test_serialize_include (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 39, in test_serialize_include
    self.assertEquals(out, '[ %s ]' % self.SITE_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } } ]'

======================================================================
FAIL: test_serialize_to_response (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 27, in test_serialize_to_response
    self.assertEquals(out, self.BASIC_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 }, { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } }, { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

----------------------------------------------------------------------
Ran 4 tests in 0.008s

FAILED (failures=3)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/Users/peterconerly/code/django-smuggler/.tox/py26-1.5/bin/python tests/run_tests.py'
py27-1.3 inst-nodeps: /Users/peterconerly/code/django-smuggler/.tox/dist/django-smuggler-0.4.1.zip
py27-1.3 runtests: PYTHONHASHSEED='3745116371'
py27-1.3 runtests: commands[0] | python tests/run_tests.py
Creating test database for alias 'default'...
FFF.
======================================================================
FAIL: test_serialize_exclude (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 33, in test_serialize_exclude
    self.assertEquals(out, '[ %s ]' % self.FLATPAGE_DUMP)
AssertionError: '[ { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

======================================================================
FAIL: test_serialize_include (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 39, in test_serialize_include
    self.assertEquals(out, '[ %s ]' % self.SITE_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } } ]'

======================================================================
FAIL: test_serialize_to_response (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 27, in test_serialize_to_response
    self.assertEquals(out, self.BASIC_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 }, { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } }, { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

----------------------------------------------------------------------
Ran 4 tests in 0.006s

FAILED (failures=3)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/Users/peterconerly/code/django-smuggler/.tox/py27-1.3/bin/python tests/run_tests.py'
py27-1.4 inst-nodeps: /Users/peterconerly/code/django-smuggler/.tox/dist/django-smuggler-0.4.1.zip
py27-1.4 runtests: PYTHONHASHSEED='3745116371'
py27-1.4 runtests: commands[0] | python tests/run_tests.py
Creating test database for alias 'default'...
FFF.
======================================================================
FAIL: test_serialize_exclude (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 33, in test_serialize_exclude
    self.assertEquals(out, '[ %s ]' % self.FLATPAGE_DUMP)
AssertionError: '[ { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

======================================================================
FAIL: test_serialize_include (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 39, in test_serialize_include
    self.assertEquals(out, '[ %s ]' % self.SITE_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } } ]'

======================================================================
FAIL: test_serialize_to_response (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 27, in test_serialize_to_response
    self.assertEquals(out, self.BASIC_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 }, { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } }, { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

----------------------------------------------------------------------
Ran 4 tests in 0.007s

FAILED (failures=3)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/Users/peterconerly/code/django-smuggler/.tox/py27-1.4/bin/python tests/run_tests.py'
py27-1.5 inst-nodeps: /Users/peterconerly/code/django-smuggler/.tox/dist/django-smuggler-0.4.1.zip
py27-1.5 runtests: PYTHONHASHSEED='3745116371'
py27-1.5 runtests: commands[0] | python tests/run_tests.py
Creating test database for alias 'default'...
FFF.
======================================================================
FAIL: test_serialize_exclude (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 33, in test_serialize_exclude
    self.assertEquals(out, '[ %s ]' % self.FLATPAGE_DUMP)
AssertionError: '[ { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

======================================================================
FAIL: test_serialize_include (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 39, in test_serialize_include
    self.assertEquals(out, '[ %s ]' % self.SITE_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } } ]'

======================================================================
FAIL: test_serialize_to_response (test_app.tests.BasicDumpTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/peterconerly/code/django-smuggler/tests/test_app/tests.py", line 27, in test_serialize_to_response
    self.assertEquals(out, self.BASIC_DUMP)
AssertionError: '[ { "fields": { "name": "example.com", "domain": "example.com" }, "model": "sites.site", "pk": 1 }, { "fields": { "enable_comments": false, "registration_required": false, "template_name": "", "title": "test", "sites": [], "url": "/", "content": "" }, "model": "flatpages.flatpage", "pk": 1 } ]' != '[ { "pk": 1, "model": "sites.site", "fields": { "domain": "example.com", "name": "example.com" } }, { "pk": 1, "model": "flatpages.flatpage", "fields": { "registration_required": false, "title": "test", "url": "/", "template_name": "", "sites": [], "content": "", "enable_comments": false } } ]'

----------------------------------------------------------------------
Ran 4 tests in 0.008s

FAILED (failures=3)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/Users/peterconerly/code/django-smuggler/.tox/py27-1.5/bin/python tests/run_tests.py'
________________________________________________________________ summary _________________________________________________________________
ERROR:   py25-1.2: UnsupportedInterpreter: python2.5 is not supported anymore, sorry
ERROR:   py25-1.3: UnsupportedInterpreter: python2.5 is not supported anymore, sorry
ERROR:   py26-1.3: commands failed
ERROR:   py26-1.4: commands failed
ERROR:   py26-1.5: commands failed
ERROR:   py27-1.3: commands failed
ERROR:   py27-1.4: commands failed
ERROR:   py27-1.5: commands failed
@jaap3
Copy link
Collaborator

jaap3 commented Aug 16, 2014

Yeah the test suite is not in great shape. This project has been dormant for a while. Support for Django 1.3 can be dropped. Not sure about 1.4. I might be able to look into this project the coming week, but cannot say for sure yet.

@jaap3
Copy link
Collaborator

jaap3 commented Aug 17, 2014

Easiest thing for now is to not test a dump of flatpages and find some other app/model instead.

@jaap3 jaap3 mentioned this issue Aug 18, 2014
@jaap3
Copy link
Collaborator

jaap3 commented Aug 18, 2014

This has been fixed in 3f3d376

@jaap3 jaap3 closed this as completed Aug 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants