Exemplo n.º 1
0
def test_defined_max_length_patch(master_entity_type):
    key_property = master_entity_type.proprty('Key')
    monkey.patch_proprty_max_length(key_property)
    assert key_property.max_length == 5
Exemplo n.º 2
0
def test_property_with_max_keyword_length_patch(master_entity_type):
    data_property = master_entity_type.proprty('Data')
    monkey.patch_proprty_max_length(data_property)
    assert data_property.max_length == monkey.MAX_STRING_LENGTH
Exemplo n.º 3
0
def test_int_type_max_length_patch(master_entity_type):
    fiscal_year_property = master_entity_type.proprty('FiscalYear')
    monkey.patch_proprty_max_length(fiscal_year_property)
    assert fiscal_year_property.max_length == None
Exemplo n.º 4
0
def test_non_existent_max_length_patch(master_entity_type):
    data_type_property = master_entity_type.proprty('DataType')
    monkey.patch_proprty_max_length(data_type_property)
    assert data_type_property.max_length == monkey.MAX_STRING_LENGTH