Skip to content

Commit

Permalink
Add test for Model.objects.get_or_create(). Closes #156
Browse files Browse the repository at this point in the history
the issue is not reproducible after the upgrade to pylint 2.0
where I deleted most of the transformations, including the
offending one.
  • Loading branch information
atodorov committed Aug 2, 2018
1 parent f809ee3 commit 1193f58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pylint_django/tests/input/func_noerror_model_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class SomeModel(models.Model):
pass
name = models.CharField(max_length=64)


if __name__ == '__main__':
Expand All @@ -18,3 +18,5 @@ class SomeModel(models.Model):
# added in django 1.6
FIRST = SomeModel.objects.first()
LAST = SomeModel.objects.last()

DB_RECORD, CREATED = SomeModel.objects.get_or_create(name='Tester')

0 comments on commit 1193f58

Please sign in to comment.