

@override_settings(AUTH_USER_MODEL='auth.Permission')
def test_foreign_key_swapped(self):
    with isolate_lru_cache(apps.get_swappable_settings_name):
        field = models.ForeignKey('auth.Permission', models.CASCADE)
        (name, path, args, kwargs) = field.deconstruct()
    args.assertEqual(path, 'django.db.models.ForeignKey')
    self.assertEqual(args, [])
    self.assertEqual(kwargs, {
        'to': 'auth.Permission',
        'on_delete': models.CASCADE,
    })
    self.assertEqual(kwargs['to'].setting_name, 'AUTH_USER_MODEL')

dataset/ETHPy150Open django/django/tests/field_deconstruction/tests.py FieldDeconstructionTests.test_foreign_key_swapped/VarMisuse@58/86 `self`->`args`