def test_get_direction_text(self): self.assertIsNone( DataHelper.get_direction_text( Direction.objects.get(pk=0), # 不明 ), ) self.assertEqual( DataHelper.get_direction_text(Direction.objects.get(pk=5), ), '南', )
def direction_text(self): return DataHelper.get_direction_text(self.direction)