Re: Strange failing test

2016-08-24 Thread Gergely Polonkai
That’s indeed great news. Too bad I’m rooted with 1.9 for a while, as 1.10 doesn’t play nice with Python 2.7.8. I hope I can upgrade both Python and Django to as recent as possible soon. Thank you for the info anyways! Tim Graham ezt írta (időpont: 2016. aug. 24., Sze, 16:59): > You'll be glad t

Re: Strange failing test

2016-08-24 Thread Tim Graham
You'll be glad to know that's fixed in Django 1.10: https://github.com/django/django/commit/e0837f2cb12de5e95e621d19b186b0da43bcdee2 On Wednesday, August 24, 2016 at 10:27:37 AM UTC-4, Gergely Polonkai wrote: > > It just turned out that value_list(…, flat=True) returns a QuerySet, not a > list.

Re: Strange failing test

2016-08-24 Thread Gergely Polonkai
It just turned out that value_list(…, flat=True) returns a QuerySet, not a list. So expected_json couldn’t be equal to the actual result. It took a bit of debugging as repr() displays [1, 2, 3], not QuerySet(1, 2, 3) or something. Derek ezt írta (időpont: 2016. aug. 24., Sze, 16:03): > Assuming

Re: Strange failing test

2016-08-24 Thread Derek
Assuming that the long function you have embedded inside your dictionary simply generates a list i.e. cloned_build.groupings.get(group=group1) .field_values .exclude(template=approvable_template) .values_list('id', flat=True)[:] results in: [1,2,3] Then some examples of possible t

Strange failing test

2016-08-24 Thread Gergely Polonkai
Hello, I have a test that fetches some JSON data from my API and compares it with the expected result, which is generated like this: expected_json = { 'status': 'ok', 'invalid-fields': {}, 'updated-fields': cloned_build.groupings.get(group=group1)