Skip to content

Commit

Permalink
add on_delete= attribute to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed May 3, 2017
1 parent d891d87 commit a2bfad5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/demo/models.py
Expand Up @@ -43,15 +43,16 @@ class Meta:


class UserDetail(models.Model):
user = models.ForeignKey(User)
user = models.ForeignKey(User, on_delete=models.CASCADE)
note = models.CharField(max_length=10, blank=True)

class Meta:
app_label = 'demo'


class DemoOneToOne(models.Model):
demo = models.OneToOneField(DemoModel, related_name='onetoone')
demo = models.OneToOneField(DemoModel, on_delete=models.CASCADE,
related_name='onetoone')

class Meta:
app_label = 'demo'
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Expand Up @@ -35,6 +35,8 @@ deps=
d19: django>=1.9,<1.10
d110: django>=1.10,<1.11
d111: django>=1.11,<1.12

; only for local development
d20: django>=2.0dev,<2.11
dev: git+https://github.com/django/django.git

Expand Down

0 comments on commit a2bfad5

Please sign in to comment.