OpenSlides/tests/old/core/models.py
Oskar Hahn e7230b7391 New Test order.
* seperate unittests and integration tests
* moved old tests in seperat folder 'old'
* created a testrunner that does not create a testdatabase, if only unittests are run
* wrote some unit- and integration tests as examples
* fixed user.get_short_name() to use the sort order from config
* fixed wrong url_pattern in the user app
2015-01-24 18:00:03 +01:00

13 lines
337 B
Python

from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length='255')
def get_absolute_url(self, link='detail'):
if link == 'detail':
return 'detail-url-here'
if link == 'delete':
return 'delete-url-here'
raise ValueError('No URL for %s' % link)