#27203: Update tests that use assertQuerysetEqual lambda o: o to use
assertSequenceEqual
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
For example:
{{{ #!diff
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
index 27929c9..459d317 100644
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -94,7 +94,7 @@ class BasicExpressionsTests(TestCase):
# We can set one field to have the value of another field
# Make sure we have enough chairs
self.company_query.update(num_chairs=F("num_employees"))
- self.assertQuerysetEqual(
+ self.assertSequenceEqual(
self.company_query, [
{
"num_chairs": 2300,
@@ -112,7 +112,6 @@ class BasicExpressionsTests(TestCase):
"num_employees": 32
}
],
- lambda o: o
)
def test_arithmetic(self):
}}}
When searching for cases to replace, there might be other letters besides
'o' in `lambda o: o`.
--
Ticket URL: <https://code.djangoproject.com/ticket/27203>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.ed99604fe1c07a864fcd462845669f85%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.