* 21 - Improving exception when an invalid type is used in the config

* Bumping the version
This commit is contained in:
mtakaki
2020-01-06 07:40:11 -08:00
committed by GitHub
parent a13a42d51c
commit bcafbd64f7
6 changed files with 137 additions and 2 deletions

View File

@@ -329,6 +329,9 @@ class Expectation(object):
'LATENCY': Latency,
'REGEX': Regex
}
if configuration['type'] not in expectations:
raise ConfigurationValidationError(f"Invalid type: {configuration['type']}")
return expectations.get(configuration['type'])(configuration)
def __init__(self, configuration):