summaryrefslogtreecommitdiff
path: root/tests/annotations
diff options
context:
space:
mode:
authorAuthor: Mads Jensen <mje@inducks.org>2020-01-22 15:05:56 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-04-15 20:20:32 +0200
commit6461583b6cc257d25880ef9a9fd7e2125ac53ce1 (patch)
treebbade5fb7117ac74da58e8f78b51cd7136a34b21 /tests/annotations
parentf1a808a5025b63715d1034af2b96a6a5241d29e9 (diff)
downloaddjango-6461583b6cc257d25880ef9a9fd7e2125ac53ce1.tar.gz
Removed unused __str__() methods in tests models.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
Diffstat (limited to 'tests/annotations')
-rw-r--r--tests/annotations/models.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/annotations/models.py b/tests/annotations/models.py
index cd3d6ddb87..c8fbe17792 100644
--- a/tests/annotations/models.py
+++ b/tests/annotations/models.py
@@ -6,17 +6,11 @@ class Author(models.Model):
age = models.IntegerField()
friends = models.ManyToManyField('self', blank=True)
- def __str__(self):
- return self.name
-
class Publisher(models.Model):
name = models.CharField(max_length=255)
num_awards = models.IntegerField()
- def __str__(self):
- return self.name
-
class Book(models.Model):
isbn = models.CharField(max_length=9)
@@ -29,9 +23,6 @@ class Book(models.Model):
publisher = models.ForeignKey(Publisher, models.CASCADE)
pubdate = models.DateField()
- def __str__(self):
- return self.name
-
class Store(models.Model):
name = models.CharField(max_length=255)
@@ -40,16 +31,10 @@ class Store(models.Model):
friday_night_closing = models.TimeField()
area = models.IntegerField(null=True, db_column='surface')
- def __str__(self):
- return self.name
-
class DepartmentStore(Store):
chain = models.CharField(max_length=255)
- def __str__(self):
- return '%s - %s ' % (self.chain, self.name)
-
class Employee(models.Model):
# The order of these fields matter, do not change. Certain backends
@@ -62,9 +47,6 @@ class Employee(models.Model):
age = models.IntegerField()
salary = models.DecimalField(max_digits=8, decimal_places=2)
- def __str__(self):
- return '%s %s' % (self.first_name, self.last_name)
-
class Company(models.Model):
name = models.CharField(max_length=200)
@@ -81,6 +63,3 @@ class Company(models.Model):
class Ticket(models.Model):
active_at = models.DateTimeField()
duration = models.DurationField()
-
- def __str__(self):
- return '{} - {}'.format(self.active_at, self.duration)