mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
#1794 - fixes from review
This commit is contained in:
parent
216d2ab30e
commit
0b02e5348a
3 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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__))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue