def test_match(self): f = Field(name="NAME") f.mapping("PRETTY_NAME") self.assertEqual(f.match("NAME"), True) self.assertEqual(f.match("PRETTY_NAME"), True) self.assertEqual(f.match("OTHER"), False)
def test_get_name(self): f = Field(name="NAME") f.mapping("PRETTY_NAME") self.assertEqual(f.get_name(), "PRETTY_NAME") self.assertEqual(f.get_name(no_mapping=True), "NAME")
def test_mapping(self): f = Field(name="NAME") f.mapping("PRETTY_NAME") self.assertEqual(f.mapping_name, "PRETTY_NAME")