Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures with Django 1.10 #432

Closed
nijel opened this issue Aug 18, 2016 · 4 comments
Closed

Test failures with Django 1.10 #432

nijel opened this issue Aug 18, 2016 · 4 comments

Comments

@nijel
Copy link
Contributor

nijel commented Aug 18, 2016

When running testsuite on Django 1.10 several tests fail:

======================================================================
FAIL: test_form (tests.tests.TaggableFormCustomPKTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 790, in test_form
    <tr><th><label for="id_tags">Tags:</label></th><td><input type="text" name="tags" value="green, red, yummy" id="id_tags" /><br />%(help_start)sA comma-separated list of tags.%(help_stop)s</td></tr>""")
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 66, in assertFormRenders
    self.assertHTMLEqual(str(form), self._get_form_str(html))
  File "/home/nijel/work/debian/django-taggit/django/test/testcases.py", line 699, in assertHTMLEqual
    self.fail(self._formatMessage(msg, standardMsg))
AssertionError: <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]... != <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]...
  <tr>
  <th>
  <label for="id_name">
  Name:
  </label>
  </th><td>
- <input id="id_name" maxlength="50" name="name" required type="text" value="apple" />
?                                                ---------

+ <input id="id_name" maxlength="50" name="name" type="text" value="apple" />
  </td>
  </tr><tr>
  <th>
  <label for="id_tags">
  Tags:
  </label>
  </th><td>
- <input id="id_tags" name="tags" required type="text" value="green, red, yummy" /><br /><span class="helptext">
?                                 ---------

+ <input id="id_tags" name="tags" type="text" value="green, red, yummy" /><br /><span class="helptext">
  A comma-separated list of tags.
  </span>
  </td>
  </tr>

======================================================================
FAIL: test_form (tests.tests.TaggableFormDirectCustomPKTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 790, in test_form
    <tr><th><label for="id_tags">Tags:</label></th><td><input type="text" name="tags" value="green, red, yummy" id="id_tags" /><br />%(help_start)sA comma-separated list of tags.%(help_stop)s</td></tr>""")
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 66, in assertFormRenders
    self.assertHTMLEqual(str(form), self._get_form_str(html))
  File "/home/nijel/work/debian/django-taggit/django/test/testcases.py", line 699, in assertHTMLEqual
    self.fail(self._formatMessage(msg, standardMsg))
AssertionError: <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]... != <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]...
  <tr>
  <th>
  <label for="id_name">
  Name:
  </label>
  </th><td>
- <input id="id_name" maxlength="50" name="name" required type="text" value="apple" />
?                                                ---------

+ <input id="id_name" maxlength="50" name="name" type="text" value="apple" />
  </td>
  </tr><tr>
  <th>
  <label for="id_tags">
  Tags:
  </label>
  </th><td>
- <input id="id_tags" name="tags" required type="text" value="green, red, yummy" /><br /><span class="helptext">
?                                 ---------

+ <input id="id_tags" name="tags" type="text" value="green, red, yummy" /><br /><span class="helptext">
  A comma-separated list of tags.
  </span>
  </td>
  </tr>

======================================================================
FAIL: test_form (tests.tests.TaggableFormDirectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 790, in test_form
    <tr><th><label for="id_tags">Tags:</label></th><td><input type="text" name="tags" value="green, red, yummy" id="id_tags" /><br />%(help_start)sA comma-separated list of tags.%(help_stop)s</td></tr>""")
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 66, in assertFormRenders
    self.assertHTMLEqual(str(form), self._get_form_str(html))
  File "/home/nijel/work/debian/django-taggit/django/test/testcases.py", line 699, in assertHTMLEqual
    self.fail(self._formatMessage(msg, standardMsg))
AssertionError: <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]... != <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]...
  <tr>
  <th>
  <label for="id_name">
  Name:
  </label>
  </th><td>
- <input id="id_name" maxlength="50" name="name" required type="text" value="apple" />
?                                                ---------

+ <input id="id_name" maxlength="50" name="name" type="text" value="apple" />
  </td>
  </tr><tr>
  <th>
  <label for="id_tags">
  Tags:
  </label>
  </th><td>
- <input id="id_tags" name="tags" required type="text" value="green, red, yummy" /><br /><span class="helptext">
?                                 ---------

+ <input id="id_tags" name="tags" type="text" value="green, red, yummy" /><br /><span class="helptext">
  A comma-separated list of tags.
  </span>
  </td>
  </tr>

======================================================================
FAIL: test_form (tests.tests.TaggableFormOfficialTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 790, in test_form
    <tr><th><label for="id_tags">Tags:</label></th><td><input type="text" name="tags" value="green, red, yummy" id="id_tags" /><br />%(help_start)sA comma-separated list of tags.%(help_stop)s</td></tr>""")
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 66, in assertFormRenders
    self.assertHTMLEqual(str(form), self._get_form_str(html))
  File "/home/nijel/work/debian/django-taggit/django/test/testcases.py", line 699, in assertHTMLEqual
    self.fail(self._formatMessage(msg, standardMsg))
AssertionError: <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]... != <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]...
  <tr>
  <th>
  <label for="id_name">
  Name:
  </label>
  </th><td>
- <input id="id_name" maxlength="50" name="name" required type="text" value="apple" />
?                                                ---------

+ <input id="id_name" maxlength="50" name="name" type="text" value="apple" />
  </td>
  </tr><tr>
  <th>
  <label for="id_tags">
  Tags:
  </label>
  </th><td>
- <input id="id_tags" name="tags" required type="text" value="green, red, yummy" /><br /><span class="helptext">
?                                 ---------

+ <input id="id_tags" name="tags" type="text" value="green, red, yummy" /><br /><span class="helptext">
  A comma-separated list of tags.
  </span>
  </td>
  </tr>

======================================================================
FAIL: test_form (tests.tests.TaggableFormTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 790, in test_form
    <tr><th><label for="id_tags">Tags:</label></th><td><input type="text" name="tags" value="green, red, yummy" id="id_tags" /><br />%(help_start)sA comma-separated list of tags.%(help_stop)s</td></tr>""")
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 66, in assertFormRenders
    self.assertHTMLEqual(str(form), self._get_form_str(html))
  File "/home/nijel/work/debian/django-taggit/django/test/testcases.py", line 699, in assertHTMLEqual
    self.fail(self._formatMessage(msg, standardMsg))
AssertionError: <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]... != <tr>
<th>
<label for="id_name">
Name:
</label>
</th><td>
<input id="id_name" max [truncated]...
  <tr>
  <th>
  <label for="id_name">
  Name:
  </label>
  </th><td>
- <input id="id_name" maxlength="50" name="name" required type="text" value="apple" />
?                                                ---------

+ <input id="id_name" maxlength="50" name="name" type="text" value="apple" />
  </td>
  </tr><tr>
  <th>
  <label for="id_tags">
  Tags:
  </label>
  </th><td>
- <input id="id_tags" name="tags" required type="text" value="green, red, yummy" /><br /><span class="helptext">
?                                 ---------

+ <input id="id_tags" name="tags" type="text" value="green, red, yummy" /><br /><span class="helptext">
  A comma-separated list of tags.
  </span>
  </td>
  </tr>

======================================================================
FAIL: test_add_tag (tests.tests.TaggableManagerDirectCustomPKTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 156, in test_add_tag
    self.assert_tags_equal(self.food_model.tags.all(), ['green'])
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 45, in assert_tags_equal
    self.assertEqual(got, tags)
AssertionError: Lists differ: [] != [u'green']

Second list contains 1 additional elements.
First extra element 0:
u'green'

- []
+ [u'green']

======================================================================
FAIL: test_prefetch_related (tests.tests.TaggableManagerDirectCustomPKTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nijel/work/debian/django-taggit/tests/tests.py", line 654, in test_prefetch_related
    'apple': set(['1', '2'])
AssertionError: {u'orange': set([]), u'apple': set([])} != {u'orange': set([u'2', u'4']), u'apple': set([u'1', u'2'])}
- {u'apple': set([]), u'orange': set([])}
+ {u'apple': set([u'1', u'2']), u'orange': set([u'2', u'4'])}
?                 ++++++++++                    ++++++++++

Originally spotted at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834668

@frewsxcv
Copy link
Collaborator

Fixed by #433

@nijel
Copy link
Contributor Author

nijel commented Aug 23, 2016

I can still see the last failure (tests.tests.TaggableManagerDirectCustomPKTestCase.test_prefetch_related)...

@frewsxcv frewsxcv reopened this Aug 23, 2016
@jdufresne
Copy link
Member

jdufresne commented Aug 25, 2016

I can still see the last failure (tests.tests.TaggableManagerDirectCustomPKTestCase.test_prefetch_related)...

Will be fixed in Django 1.10.1. I believe it is the result of ticket #26983.

@frewsxcv
Copy link
Collaborator

frewsxcv commented Sep 2, 2016

Should be fixed in 1.10.1 now that it's released. Let me know if it's not and I can reopen.

@frewsxcv frewsxcv closed this as completed Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants