mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +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
|
- file_handler.py - class to download test data from GDrive
|
||||||
- downloads data from (list) of files from GDrive
|
- downloads data from (list) of files from GDrive
|
||||||
- checks md5 if file ok
|
- check file integrity with MD5 hash
|
||||||
- unzips if zip
|
- unzips if zip
|
||||||
|
|
||||||
- testing_wrapper.py - base class to use for testing
|
- 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)
|
- expected - expected files (not implemented yet)
|
||||||
- input
|
- input
|
||||||
- data - test data (workfiles, images etc)
|
- data - test data (workfiles, images etc)
|
||||||
- dumps - folder for BSOn dumps from (`mongodump`)
|
- dumps - folder for BSON dumps from (`mongodump`)
|
||||||
- env_vars
|
- env_vars
|
||||||
env_vars.json - dictionary with environment variables {key:value}
|
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
|
Example
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ class DBHandler:
|
||||||
if host:
|
if host:
|
||||||
if all([user, password]):
|
if all([user, password]):
|
||||||
host = "{}:{}@{}".format(user, password, host)
|
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.client = pymongo.MongoClient(uri)
|
||||||
self.db = None
|
self.db = None
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ class TestCase:
|
||||||
all_vars.update(vars(TestCase)) # TODO check
|
all_vars.update(vars(TestCase)) # TODO check
|
||||||
value = value.format(**all_vars)
|
value = value.format(**all_vars)
|
||||||
print("Setting {}:{}".format(key, value))
|
print("Setting {}:{}".format(key, value))
|
||||||
monkeypatch_session.setenv(key, value)
|
monkeypatch_session.setenv(key, str(value))
|
||||||
import openpype
|
import openpype
|
||||||
|
|
||||||
openpype_root = os.path.dirname(os.path.dirname(openpype.__file__))
|
openpype_root = os.path.dirname(os.path.dirname(openpype.__file__))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue