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