Ejemplo n.º 1
0
    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"))
Ejemplo n.º 2
0
 def test_name(self):
     self.assertEqual(PersonStatus.name(PersonStatus.ALIVE), six.text_type('ALIVE'))
Ejemplo n.º 3
0
 def test_name(self):
     self.assertEqual(PersonStatus.name(PersonStatus.ALIVE), u'ALIVE')
Ejemplo n.º 4
0
 def test_name(self):
     self.assertEqual(PersonStatus.name(PersonStatus.ALIVE), six.text_type('ALIVE'))
Ejemplo n.º 5
0
 def test_name(self):
     self.assertEqual(PersonStatus.name(PersonStatus.ALIVE), u'ALIVE')