Example #1
0
def test_util_tags_data_tool_instance():
    # tests that base tool does not implement a data_manager
    # and that the default coalesce is to return the data

    tool = TagsDataTool()

    with pytest.raises(NotImplementedError):
        tool.data_manager

    assert tool.coalesce("X") == "X"
Example #2
0
def test_util_tags_data_tool_instance():
    # tests that base tool does not implement a data_manager
    # and that the default coalesce is to return the data

    tool = TagsDataTool()

    with pytest.raises(NotImplementedError):
        tool.data_manager

    assert tool.coalesce('X') == 'X'
Example #3
0
def test_util_tags_data_tool_managers():
    # tests that the data tool has expected managers

    tool = TagsDataTool()
    assert tool.tag_manager == Tag.objects
    assert tool.locale_manager == Locale.objects
    assert tool.project_manager == Project.objects
    assert tool.resource_manager == Resource.objects
    assert tool.tr_manager == TranslatedResource.objects
    assert tool.translation_manager == Translation.objects