Пример #1
0
    def test_get_attr_name(self, MockEntityModel, mock_decoded_token):

        self.config.entity_models = [MockEntityModel]

        entity = Entity(self.config)
        entity.get_entity_from_token_or_tablename(mock_decoded_token)

        result = entity.get_attr_name()

        assert result == "id"
Пример #2
0
    def test_get_attr_name(self, MockEntityModel, mock_decoded_token):

        self.ext.entity_models = [MockEntityModel]

        entity = Entity(self.ext)
        entity.get_entity_from_token(mock_decoded_token)

        result = entity.get_attr_name()

        assert result == "id"