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

django-test-suite: model_formsets failures #424

Open
timgraham opened this issue Apr 9, 2020 · 0 comments
Open

django-test-suite: model_formsets failures #424

timgraham opened this issue Apr 9, 2020 · 0 comments
Labels
api: spanner Issues related to the googleapis/python-spanner-django API. needs-investigation priority: p2 Moderately-important priority. Fix may not be included in next release.

Comments

@timgraham
Copy link
Contributor

timgraham commented Apr 9, 2020

These failure are probably due to patching of AutoField. Need to investigate the implications.

======================================================================
FAIL: model_formsets.tests.ModelFormsetTest.test_prevent_change_outer_model_and_create_invalid_data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/model_formsets/tests.py", line 1683, in test_prevent_change_outer_model_and_create_invalid_data
    self.assertQuerysetEqual(Author.objects.all(), ['<Author: Charles>', '<Author: Walt>'])
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: ['<Author: Changed name>', '<Author: Charles>', '<Author: Walt>'] != ['<Author: Charles>', '<Author: Walt>']

First differing element 0:
'<Author: Changed name>'
'<Author: Charles>'

First list contains 1 additional elements.
First extra element 2:
'<Author: Walt>'

- ['<Author: Changed name>', '<Author: Charles>', '<Author: Walt>']
?            --------------------------

+ ['<Author: Charles>', '<Author: Walt>']
======================================================================
FAIL: test_no_delete (model_formsets_regress.tests.FormfieldShouldDeleteFormTests)
Verify base formset doesn't modify database
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/model_formsets_regress/tests.py", line 457, in test_no_delete
    self.assertTrue(formset.is_valid())
AssertionError: False is not true
======================================================================
FAIL: test_extraneous_query_is_not_run (model_formsets_regress.tests.FormsetTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/model_formsets_regress/tests.py", line 307, in test_extraneous_query_is_not_run
    formset.save()
  File "/home/tim/code/django/django/test/testcases.py", line 85, in __exit__
    '%d. %s' % (i, query['sql']) for i, query in enumerate(self.captured_queries, start=1)
AssertionError: 3 != 1 : 3 queries executed, 1 expected
Captured queries were:
1. QUERY = 'SELECT (1) AS a FROM model_formsets_regress_network WHERE model_formsets_regress_network.id = %s  LIMIT 1' - PARAMS = (2714094443186884760,)
2. QUERY = 'UPDATE model_formsets_regress_network SET name = %s WHERE model_formsets_regress_network.id = %s' - PARAMS = ('Random Place', 2714094443186884760)
3. QUERY = 'INSERT INTO model_formsets_regress_network (id, name) VALUES (%s, %s)' - PARAMS = (2714094443186884760, 'Random Place')
@timgraham timgraham added needs-investigation api: spanner Issues related to the googleapis/python-spanner-django API. labels Apr 9, 2020
@timgraham timgraham changed the title django-test-suite: model_formsets.tests test_prevent_change_outer_model_and_create_invalid_data failure django-test-suite: model_formsets failures Apr 9, 2020
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 10, 2020
@odeke-em odeke-em added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Apr 16, 2020
@yoshi-automation yoshi-automation removed the 🚨 This issue needs some love. label Apr 16, 2020
@paul1319 paul1319 self-assigned this Aug 6, 2020
@paul1319 paul1319 removed their assignment Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-django API. needs-investigation priority: p2 Moderately-important priority. Fix may not be included in next release.
Projects
None yet
Development

No branches or pull requests

4 participants