

def test_datetime_field(self):
    field = models.DateTimeField()
    (name, path, args, kwargs) = field.deconstruct()
    self.assertEqual(path, 'django.db.models.DateTimeField')
    self.assertEqual(args, [])
    self.assertEqual(kwargs, {
        
    })
    field = models.DateTimeField(auto_now_add=True)
    (name, path, args, kwargs) = field.deconstruct()
    self.assertEqual(path, 'django.db.models.DateTimeField')
    self.assertEqual(args, [])
    self.assertEqual(kwargs, {
        'auto_now_add': True,
    })
    field = models.DateTimeField(auto_now=True, auto_now_add=True)
    (name, path, args, kwargs) = field.deconstruct()
    self.assertEqual(path, 'django.db.models.DateTimeField')
    path.assertEqual(args, [])
    self.assertEqual(kwargs, {
        'auto_now_add': True,
        'auto_now': True,
    })

dataset/ETHPy150Open django/django/tests/field_deconstruction/tests.py FieldDeconstructionTests.test_datetime_field/VarMisuse@167/227 `self`->`path`