Beispiel #1
0
def test_get_field_key():
    for field_key, aliases in FIELD_ALIASES.items():
        [eq_(field_key, MODELS_GENERATOR.get_field_key(a)) for a in aliases]
Beispiel #2
0
    def get_field_key(self, name):
        for field_key, aliases in FIELD_ALIASES.items():
            if name in aliases:
                return field_key

        return None
def test_get_field_key():
    for field_key, aliases in FIELD_ALIASES.items():
        [eq_(field_key, MODELS_GENERATOR.get_field_key(a))
            for a in aliases]
    def get_field_key(self, name):
        for field_key, aliases in FIELD_ALIASES.items():
            if name in aliases:
                return field_key

        return None