Permalink
Browse files

Split doctests for utils into seperated parts for truncate_letters an…

…d uuid tests
  • Loading branch information...
trbs committed Dec 11, 2010
1 parent 22b5af8 commit 7896310ab42c7fa7729174e16d39993d5db8afc4
Showing with 7 additions and 3 deletions.
  1. +4 −2 django_extensions/tests/__init__.py
  2. +3 −1 django_extensions/tests/utils.py
@@ -1,11 +1,13 @@
from django.db import models
-from django_extensions.tests.utils import UTILS_TESTS
+from django_extensions.tests.utils import UTILS_TRUNCATE_LETTERS_TESTS
+from django_extensions.tests.utils import UTILS_UUID_TESTS
try:
from django_extensions.tests.encrypted_fields import EncryptedFieldsTestCase
from django_extensions.tests.models import Secret
except ImportError:
pass
__test__ = {
- 'UTILS_TESTS': UTILS_TESTS,
+ 'UTILS_TRUNCATE_LETTERS_TESTS': UTILS_TRUNCATE_LETTERS_TESTS,
+ 'UTILS_UUID_TESTS': UTILS_UUID_TESTS,
}
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-UTILS_TESTS = """
+UTILS_TRUNCATE_LETTERS_TESTS = """
>>> from django_extensions.utils.text import truncate_letters
>>> truncate_letters("hello tests", 100)
u'hello tests'
@@ -21,7 +21,9 @@
>>> truncate_letters("峠 (とうげ tōge - mountain pass)", 10)
u'\u5ce0 (\u3068\u3046\u3052 t\u014dg...'
+"""
+UTILS_UUID_TESTS = """
>>> from django_extensions.utils import uuid
# make a UUID using an MD5 hash of a namespace UUID and a name

0 comments on commit 7896310

Please sign in to comment.