From c7734491f87ac711ff5d749213e8cac0adb3686b Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 15 Aug 2012 01:12:45 -0700 Subject: [PATCH] Use a name that exists in both python2 and 3, --- tests/modeltests/custom_pk/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modeltests/custom_pk/fields.py b/tests/modeltests/custom_pk/fields.py index 2494d5fd2c..92096a0ff7 100644 --- a/tests/modeltests/custom_pk/fields.py +++ b/tests/modeltests/custom_pk/fields.py @@ -31,7 +31,7 @@ class MyAutoField(six.with_metaclass(models.SubfieldBase, models.CharField)): def pre_save(self, instance, add): value = getattr(instance, self.attname, None) if not value: - value = MyWrapper(''.join(random.sample(string.lowercase, 10))) + value = MyWrapper(''.join(random.sample(string.ascii_lowercase, 10))) setattr(instance, self.attname, value) return value