예제 #1
0
def test_model_to_dict_deep(instance, result):
    """Test model to dict recursive."""
    assert sqlalchemy.model_to_dict(instance, result.keys()) == result
예제 #2
0
def test_dict_to_model_deep(instance, result):
    """Test dict to model conversion recursive."""
    sqlalchemy.dict_to_model(instance, result)
    assert sqlalchemy.model_to_dict(instance, result.keys()) == result
예제 #3
0
def test_model_to_dict(model, result):
    """Test model to dict conversion."""
    assert sqlalchemy.model_to_dict(model(**result), result.keys()) == result