From a5f78b1b1d66b345a5a64154cf6fc9659c14ae38 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Tue, 9 Jun 2020 16:35:13 +0200
Subject: [PATCH] REVIEW: fix tests

---
 unittests/test_add_property.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/unittests/test_add_property.py b/unittests/test_add_property.py
index 3d7f53db..874314ee 100644
--- a/unittests/test_add_property.py
+++ b/unittests/test_add_property.py
@@ -199,14 +199,16 @@ def test_property_parameter_with_entity_and_datatype():
     assert concrete_property.value is None
     assert concrete_property.datatype == db.INTEGER
 
-    concrete_property.datatype = None
+    concrete_property.datatype = db.DOUBLE
     concrete_property.value = 3.14
 
     with raises(ValueError):
         # cannot parse 3.14 to integer
         concrete_property.datatype = db.INTEGER
-    concrete_property.datatype = None
-    concrete_property.value = 3.14
+
+    # nothing should've changed after the ValueError
+    assert concrete_property.datatype == db.DOUBLE
+    assert concrete_property.value == 3.14
 
 
 def test_kw_name_and_value():
-- 
GitLab