aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-03-10 14:53:26 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2015-03-10 14:53:26 +0100
commit4372c86bd850c9acaace468315dd6ae325c9236a (patch)
tree40758821a849fa952ad39fc16486b8cb5ce747a6
parent2a150b6dcb708886c841af53419db74ea0069362 (diff)
Rework exception messages.
-rw-r--r--app/models/test_case.py10
-rw-r--r--app/models/test_set.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/app/models/test_case.py b/app/models/test_case.py
index 1d95233..7dbbebf 100644
--- a/app/models/test_case.py
+++ b/app/models/test_case.py
@@ -119,7 +119,7 @@ class TestCaseDocument(mbase.BaseDocument):
value = {}
if not isinstance(value, types.DictionaryType):
raise ValueError(
- "The parameters need to be passed as a dictionary")
+ "The parameters must be passed as a dictionary")
self._parameters = value
@property
@@ -151,7 +151,7 @@ class TestCaseDocument(mbase.BaseDocument):
if not value:
value = []
if not isinstance(value, types.ListType):
- raise ValueError("Attachments need to be passed as a list")
+ raise ValueError("Attachments must be passed as a list")
self._attachments = value
def add_attachment(self, attachment):
@@ -168,7 +168,7 @@ class TestCaseDocument(mbase.BaseDocument):
self._attachments.append(attachment)
else:
raise ValueError(
- "Attachment should be non-empty dictionary-like object")
+ "Attachment must be non-empty dictionary-like object")
@property
def measurements(self):
@@ -185,7 +185,7 @@ class TestCaseDocument(mbase.BaseDocument):
if not value:
value = []
if not isinstance(value, types.ListType):
- raise ValueError("Measurements need to be passed as a list")
+ raise ValueError("Measurements must be passed as a list")
self._measurements = value
def add_measurement(self, measurement):
@@ -203,7 +203,7 @@ class TestCaseDocument(mbase.BaseDocument):
self._measurements.append(measurement)
else:
raise ValueError(
- "Measurement should be non-empty dictionary-like object")
+ "Measurement must be non-empty dictionary-like object")
@property
def status(self):
diff --git a/app/models/test_set.py b/app/models/test_set.py
index 5e7a99b..3c3a513 100644
--- a/app/models/test_set.py
+++ b/app/models/test_set.py
@@ -105,7 +105,7 @@ class TestSetDocument(mbase.BaseDocument):
value = []
if not isinstance(value, types.ListType):
raise ValueError(
- "The associated test cases need to be passed as a list")
+ "The associated test cases must be passed as a list")
self._test_case = value
@property
@@ -124,7 +124,7 @@ class TestSetDocument(mbase.BaseDocument):
value = {}
if not isinstance(value, types.DictionaryType):
raise ValueError(
- "The parameters need to be passed as a dictionary")
+ "The parameters must be passed as a dictionary")
self._parameters = value
@property