1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

queryset-refactor: Merged from trunk up to [6595].

git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-10-23 12:51:22 +00:00
parent 1e1230c41c
commit 5e1a54a3a8
93 changed files with 10903 additions and 7902 deletions

View File

@@ -19,6 +19,12 @@ class Cache(unittest.TestCase):
cache.set("key", "value")
self.assertEqual(cache.get("key"), "value")
def test_add(self):
# test add (only add if key isn't already in cache)
cache.add("addkey1", "value")
cache.add("addkey1", "newvalue")
self.assertEqual(cache.get("addkey1"), "value")
def test_non_existent(self):
# get with non-existent keys
self.assertEqual(cache.get("does_not_exist"), None)