aboutsummaryrefslogtreecommitdiffstats
path: root/src/shorturls/tests/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/shorturls/tests/models.py')
-rw-r--r--src/shorturls/tests/models.py37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/shorturls/tests/models.py b/src/shorturls/tests/models.py
index f521e56..5416b17 100644
--- a/src/shorturls/tests/models.py
+++ b/src/shorturls/tests/models.py
@@ -1,3 +1,38 @@
"""
A handful of test modules to test out resolving redirects.
-""" \ No newline at end of file
+"""
+
+from django.db import models
+
+class Animal(models.Model):
+ name = models.CharField(max_length=100)
+
+ class Meta:
+ app_label = 'shorturls'
+
+ def __unicode__(self):
+ return self.name
+
+ def get_absolute_url(self):
+ return '/animal/%s/' % self.id
+
+class Vegetable(models.Model):
+ name = models.CharField(max_length=100)
+
+ class Meta:
+ app_label = 'shorturls'
+
+ def __unicode__(self):
+ return self.name
+
+ def get_absolute_url(self):
+ return 'http://example.net/veggies/%s' % self.id
+
+class Mineral(models.Model):
+ name = models.CharField(max_length=100)
+
+ class Meta:
+ app_label = 'shorturls'
+
+ def __unicode__(self):
+ return self.name \ No newline at end of file