safe.utilities.test.test_keyword_io module

Tests for keyword io class.

class safe.utilities.test.test_keyword_io.KeywordIOTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests for reading and writing of raster and vector data

read_db_keywords(db_path)[source]

Can we read sqlite keywords with the generic readKeywords method

setUp()[source]
tearDown()[source]
test_are_keywords_file_based()[source]

Can we correctly determine if keywords should be written to file or to database?

test_copy_keywords()[source]

Test we can copy the keywords.

test_definition()[source]

Test we can get definitions for keywords.

New in version 3.2.

test_dict_to_row()[source]

Test the dict to row helper works.

New in version 3.2.

test_get_hash_for_datasource()[source]

Test we can reliably get a hash for a uri

test_read_db_keywords()[source]

Can we read sqlite kw with the generic read_keywords method

test_read_keywordless_layer()[source]

Test read ‘keyword’ file from keywordless layer.

test_read_raster_file_keywords()[source]

Can we read raster file keywords using generic readKeywords method

test_read_vector_file_keywords()[source]

Test read vector file keywords with the generic readKeywords method.

test_to_message()[source]

Test we can convert keywords to a message object.

New in version 3.2.

test_update_keywords()[source]

Test append file keywords with update_keywords method.

test_write_read_keyword_from_uri()[source]

Test we can set and get keywords for a non local datasource