mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.
This commit is contained in:
@@ -19,23 +19,23 @@ class RecorderTests(TestCase):
|
||||
"""
|
||||
recorder = MigrationRecorder(connection)
|
||||
self.assertEqual(
|
||||
set((x, y) for (x, y) in recorder.applied_migrations() if x == "myapp"),
|
||||
{(x, y) for (x, y) in recorder.applied_migrations() if x == "myapp"},
|
||||
set(),
|
||||
)
|
||||
recorder.record_applied("myapp", "0432_ponies")
|
||||
self.assertEqual(
|
||||
set((x, y) for (x, y) in recorder.applied_migrations() if x == "myapp"),
|
||||
{(x, y) for (x, y) in recorder.applied_migrations() if x == "myapp"},
|
||||
{("myapp", "0432_ponies")},
|
||||
)
|
||||
# That should not affect records of another database
|
||||
recorder_other = MigrationRecorder(connections['other'])
|
||||
self.assertEqual(
|
||||
set((x, y) for (x, y) in recorder_other.applied_migrations() if x == "myapp"),
|
||||
{(x, y) for (x, y) in recorder_other.applied_migrations() if x == "myapp"},
|
||||
set(),
|
||||
)
|
||||
recorder.record_unapplied("myapp", "0432_ponies")
|
||||
self.assertEqual(
|
||||
set((x, y) for (x, y) in recorder.applied_migrations() if x == "myapp"),
|
||||
{(x, y) for (x, y) in recorder.applied_migrations() if x == "myapp"},
|
||||
set(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user