def test_name(self): self.assertEqual(PersonStatus.ALIVE.name, six.text_type("ALIVE")) self.assertEqual(LabelBeer.STELLA.name, six.text_type("STELLA")) # Check that the old classmethod still works. Kept for backward compatibility. self.assertEqual(LabelBeer.name(LabelBeer.STELLA.value), six.text_type("STELLA")) self.assertEqual(PersonStatus.name("ALIVE"), six.text_type("ALIVE")) self.assertEqual(PersonStatus.name(PersonStatus.ALIVE), six.text_type("ALIVE"))
def test_name(self): self.assertEqual(PersonStatus.name(PersonStatus.ALIVE), six.text_type('ALIVE'))
def test_name(self): self.assertEqual(PersonStatus.name(PersonStatus.ALIVE), u'ALIVE')