diff --git a/opal/core/lookuplists.py b/opal/core/lookuplists.py index 7b7164f2d..2bac13359 100644 --- a/opal/core/lookuplists.py +++ b/opal/core/lookuplists.py @@ -124,7 +124,7 @@ class Meta: abstract = True unique_together = ('code', 'system') - def __unicode__(self): + def __str__(self): return self.name def to_dict(self, user): diff --git a/opal/tests/test_lookuplists.py b/opal/tests/test_lookuplists.py index 69b65a974..c1ca74a5e 100644 --- a/opal/tests/test_lookuplists.py +++ b/opal/tests/test_lookuplists.py @@ -152,8 +152,8 @@ def test_create_instance_allow_no_symptom(self): class LookupListClassTestCase(AbstractLookupListTestCase): - def test_unicode(self): - self.assertEqual(self.hat.__unicode__(), u"Cowboy") + def test_str(self): + self.assertEqual(self.hat.__str__(), u"Cowboy") def test_to_dict(self): self.assertEqual(self.hat.to_dict(self.user), "Cowboy")