Ejemplo n.º 1
0
def test_blank_title_is_not_in_dictionary_after_clearing():
    test_entry = Entry()
    test_entry.title = ("MY_TITLE", False)
    test_entry.title = ("", False)

    dictionary = test_entry.as_dict([])

    assert find_child_dataset_by_name(dictionary, NEXUS_TITLE_NAME) is None
Ejemplo n.º 2
0
def test_defined_title_is_in_dictionary():
    test_entry = Entry()
    test_entry.title = ("MY_TITLE", False)

    dictionary = test_entry.as_dict([])

    result = find_child_dataset_by_name(dictionary, NEXUS_TITLE_NAME)
    assert result is not None
    assert result["config"]["values"] == "MY_TITLE"
Ejemplo n.º 3
0
def test_title_is_set_to_use_placeholder():
    test_entry = Entry()

    test_entry.title = ("will be ignored", True)

    assert test_entry.title == (TITLE_PLACEHOLDER_VALUE, True)
Ejemplo n.º 4
0
def test_title_is_set_to_custom_value():
    test_entry = Entry()

    test_entry.title = ("MY_TITLE", False)

    assert test_entry.title == ("MY_TITLE", False)