diff --git a/tests/lib/README.md b/tests/lib/README.md index 1c2b188d84..0384cd2ff0 100644 --- a/tests/lib/README.md +++ b/tests/lib/README.md @@ -10,7 +10,7 @@ Folder for libs and tooling for automatic testing. - file_handler.py - class to download test data from GDrive - downloads data from (list) of files from GDrive - - checks md5 if file ok + - check file integrity with MD5 hash - unzips if zip - testing_wrapper.py - base class to use for testing @@ -34,11 +34,11 @@ Currently it is expected that test file will be zip file with structure: - expected - expected files (not implemented yet) - input - data - test data (workfiles, images etc) - - dumps - folder for BSOn dumps from (`mongodump`) + - dumps - folder for BSON dumps from (`mongodump`) - env_vars env_vars.json - dictionary with environment variables {key:value} - - sql - sql files to load with `mongoimport` (human readable) + - json - json files to load with `mongoimport` (human readable) Example diff --git a/tests/lib/db_handler.py b/tests/lib/db_handler.py index c38f351b76..9be70895da 100644 --- a/tests/lib/db_handler.py +++ b/tests/lib/db_handler.py @@ -19,9 +19,9 @@ class DBHandler: if host: if all([user, password]): host = "{}:{}@{}".format(user, password, host) - uri = 'mongodb://{}:{}'.format(host, port or 27017) + self.uri = 'mongodb://{}:{}'.format(host, port or 27017) - assert uri, "Must have uri to MongoDB" + assert self.uri, "Must have uri to MongoDB" self.client = pymongo.MongoClient(uri) self.db = None diff --git a/tests/lib/testing_wrapper.py b/tests/lib/testing_wrapper.py index a389741ce3..b2a89edec7 100644 --- a/tests/lib/testing_wrapper.py +++ b/tests/lib/testing_wrapper.py @@ -88,7 +88,7 @@ class TestCase: all_vars.update(vars(TestCase)) # TODO check value = value.format(**all_vars) print("Setting {}:{}".format(key, value)) - monkeypatch_session.setenv(key, value) + monkeypatch_session.setenv(key, str(value)) import openpype openpype_root = os.path.dirname(os.path.dirname(openpype.__file__))