Adding tests for unimplemented features
Helps to detect when certain feature was implemented but a test
is not in place to verify it.
Change-Id: I7a98036c94117b867206dd8c4cc87fa8cfd1eafb
Signed-off-by: Eduardo Sousa <eduardosousa@av.it.pt>
diff --git a/osm_common/tests/test_dbmemory.py b/osm_common/tests/test_dbmemory.py
index 55c900f..a11dc1a 100644
--- a/osm_common/tests/test_dbmemory.py
+++ b/osm_common/tests/test_dbmemory.py
@@ -62,6 +62,9 @@
assert db.logger == logging.getLogger(logger_name)
assert len(db.db) == 0
+def test_db_disconnect(db_memory):
+ db_memory.db_disconnect()
+
@pytest.mark.parametrize("table, filter", [
("test", {}),
("test", {"_id": 1}),
diff --git a/osm_common/tests/test_fslocal.py b/osm_common/tests/test_fslocal.py
index 77886d8..2cc7aec 100644
--- a/osm_common/tests/test_fslocal.py
+++ b/osm_common/tests/test_fslocal.py
@@ -62,6 +62,15 @@
assert fs.logger == logging.getLogger(logger_name)
assert fs.path is None
+def test_get_params(fs_local):
+ params = fs_local.get_params()
+
+ assert len(params) == 2
+ assert "fs" in params
+ assert "path" in params
+ assert params["fs"] == "local"
+ assert params["path"] == valid_path()
+
@pytest.mark.parametrize("config, exp_logger, exp_path", [
({'logger_name': 'fs_local', 'path': valid_path()}, 'fs_local', valid_path()),
({'logger_name': 'fs_local', 'path': valid_path()[:-1]}, 'fs_local', valid_path()),
@@ -86,6 +95,9 @@
fs.fs_connect(config)
assert str(excinfo.value) == exp_exception_message
+def test_fs_disconnect(fs_local):
+ fs_local.fs_disconnect()
+
def test_mkdir_with_valid_path(fs_local):
folder_name = str(uuid.uuid4())
folder_path = valid_path() + folder_name
diff --git a/osm_common/tests/test_msgbase.py b/osm_common/tests/test_msgbase.py
index c3b9726..4db3997 100644
--- a/osm_common/tests/test_msgbase.py
+++ b/osm_common/tests/test_msgbase.py
@@ -18,7 +18,7 @@
assert isinstance(msgbase, MsgBase)
def test_connect(msg_base):
- msg_base.connect()
+ msg_base.connect(None)
def test_disconnect(msg_base):
msg_base.disconnect()