improvements in dbmemory. Change yaml.load to save_load

Change-Id: I577efa64a8c1503a084cb21b49ec7e3665b7b56f
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/osm_common/tests/test_msglocal.py b/osm_common/tests/test_msglocal.py
index 5c62639..41f6eb8 100644
--- a/osm_common/tests/test_msglocal.py
+++ b/osm_common/tests/test_msglocal.py
@@ -200,7 +200,7 @@
     assert os.path.exists(file_path)
 
     with open(file_path, 'r') as stream:
-        assert yaml.load(stream) == {key: msg if not isinstance(msg, tuple) else list(msg)}
+        assert yaml.safe_load(stream) == {key: msg if not isinstance(msg, tuple) else list(msg)}
 
 
 @pytest.mark.parametrize("topic, key, msg, times", [
@@ -225,7 +225,7 @@
     with open(file_path, 'r') as stream:
         for _ in range(times):
             data = stream.readline()
-            assert yaml.load(data) == {key: msg if not isinstance(msg, tuple) else list(msg)}
+            assert yaml.safe_load(data) == {key: msg if not isinstance(msg, tuple) else list(msg)}
 
 
 def test_write_exception(msg_local_config):
@@ -453,7 +453,7 @@
     assert os.path.exists(file_path)
 
     with open(file_path, 'r') as stream:
-        assert yaml.load(stream) == {key: msg if not isinstance(msg, tuple) else list(msg)}
+        assert yaml.safe_load(stream) == {key: msg if not isinstance(msg, tuple) else list(msg)}
 
 
 @pytest.mark.parametrize("topic, key, msg, times", [
@@ -477,7 +477,7 @@
     with open(file_path, 'r') as stream:
         for _ in range(times):
             data = stream.readline()
-            assert yaml.load(data) == {key: msg if not isinstance(msg, tuple) else list(msg)}
+            assert yaml.safe_load(data) == {key: msg if not isinstance(msg, tuple) else list(msg)}
 
 
 def test_aiowrite_exception(msg_local_config, event_loop):