Merged regressiontests and modeltests into the test root.

This commit is contained in:
Florian Apolloner 2013-02-26 09:53:47 +01:00
parent b3d2ccb5bf
commit 89f40e3624
1050 changed files with 0 additions and 0 deletions

0
tests/cache/__init__.py vendored Normal file
View file

11
tests/cache/closeable_cache.py vendored Normal file
View file

@ -0,0 +1,11 @@
from django.core.cache.backends.locmem import LocMemCache
class CloseHookMixin(object):
closed = False
def close(self, **kwargs):
self.closed = True
class CacheClass(CloseHookMixin, LocMemCache):
pass

10
tests/cache/liberal_backend.py vendored Normal file
View file

@ -0,0 +1,10 @@
from django.core.cache.backends.locmem import LocMemCache
class LiberalKeyValidationMixin(object):
def validate_key(self, key):
pass
class CacheClass(LiberalKeyValidationMixin, LocMemCache):
pass

13
tests/cache/models.py vendored Normal file
View file

@ -0,0 +1,13 @@
from django.utils import timezone
from django.db import models
def expensive_calculation():
expensive_calculation.num_runs += 1
return timezone.now()
class Poll(models.Model):
question = models.CharField(max_length=200)
answer = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published', default=expensive_calculation)

1901
tests/cache/tests.py vendored Normal file

File diff suppressed because it is too large Load diff