Exemplo n.º 1
0
def empty_storage(tmpdir):
    storage = Storage(str(tmpdir))
    config = {
        "form_types": {
            "types": [
                {"short": "s", "full": "search"},
                {"short": "l", "full": "login"},
                {"short": "o", "full": "other"},
                {"short": "X", "full": "NOT ANNOTATED"}
            ],
            "simplify_map": {
                "l": "o",
            },
            "NA_value": "X",
            "skip_value": "-"
        },

        "field_types": {
            "types": [
                {"short": "us", "full": "username"},
                {"short": "p1", "full": "password"},
                {"short": "qq", "full": "search query"},
                {"short": "XX", "full": "NOT ANNOTATED"}
            ],
            "simplify_map": {},
            "NA_value": "XX",
            "skip_value": "--"
        }
    }
    storage.initialize(config)
    return storage