def test_get_config(self): test_config = { 'configId': config_table.EXCLUSIONS, 'config': 'configurations', } config_table.put_item(Item=test_config) assert test_config['config'] == config_table.get_config( test_config['configId'])
def test_update_version(self): test_version = { 'configId': config_table.VERSION, 'config': 'version50' } config_table.put_item(Item=test_version) load.update_version(test_version['config']) config_from_dynamodb = config_table.get_config( test_version['configId']) assert config_from_dynamodb == 'version50'
def test_update_exclusion_types(self): test_config = { 'configId': config_table.EXCLUSIONS, 'config': 'configurations2', } config_table.put_item(Item=test_config) load.update_exclusion_types(test_config['config']) config_from_dynamodb = config_table.get_config(test_config['configId']) assert config_from_dynamodb == 'configurations2'
def test_set_config(self): test_config = { 'configId': config_table.EXCLUSIONS, 'config': 'configurations', } config_table.put_item(Item=test_config) config_table.set_config(test_config['configId'], 'configuration2') config_from_dynamodb = config_table.get_config(test_config['configId']) assert config_from_dynamodb == 'configuration2'
def test_update_severity_colors(self): test_version = { 'configId': config_table.SEVERITYCOLORS, 'config': { 'ok': { 'background': 'FFFFFF', 'text': '11111' } } } config_table.put_item(Item=test_version) load.update_severity_colors(test_version['config']) config_from_dynamodb = config_table.get_config( test_version['configId']) assert config_from_dynamodb == { 'ok': { 'background': 'FFFFFF', 'text': '11111' } }