summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-09-01 11:06:41 -0400
committerTim Graham <timograham@gmail.com>2015-09-23 19:31:10 -0400
commite5c12f6701075fe9210c67cf472f910d745cb73a (patch)
tree56c04f92b579f8c4fc37b7a0b12d4236edcfc8d6 /tests
parent96317ad8defa89a9a4e8ecf4e22e64cb0c3054d7 (diff)
Refs #23613 -- Removed django.utils.checksums per deprecation timeline.
Diffstat (limited to 'tests')
-rw-r--r--tests/utils_tests/test_checksums.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/utils_tests/test_checksums.py b/tests/utils_tests/test_checksums.py
deleted file mode 100644
index c3888ca26b..0000000000
--- a/tests/utils_tests/test_checksums.py
+++ /dev/null
@@ -1,33 +0,0 @@
-import unittest
-
-from django.test import ignore_warnings
-from django.utils.deprecation import RemovedInDjango110Warning
-
-
-class TestUtilsChecksums(unittest.TestCase):
-
- def check_output(self, function, value, output=None):
- """
- Check that function(value) equals output. If output is None,
- check that function(value) equals value.
- """
- if output is None:
- output = value
- self.assertEqual(function(value), output)
-
- @ignore_warnings(category=RemovedInDjango110Warning)
- def test_luhn(self):
- from django.utils import checksums
- f = checksums.luhn
- items = (
- (4111111111111111, True), ('4111111111111111', True),
- (4222222222222, True), (378734493671000, True),
- (5424000000000015, True), (5555555555554444, True),
- (1008, True), ('0000001008', True), ('000000001008', True),
- (4012888888881881, True), (1234567890123456789012345678909, True),
- (4111111111211111, False), (42222222222224, False),
- (100, False), ('100', False), ('0000100', False),
- ('abc', False), (None, False), (object(), False),
- )
- for value, output in items:
- self.check_output(f, value, output)