schrodinger.test.ld_mock_modules module¶
-
class
schrodinger.test.ld_mock_modules.
MockLogin
(host='https://unit_test-8-5.dev.bb.schrodinger.com')[source]¶ Bases:
object
A mock of the
applications.livedesign.login
module for use in testing.-
HOST
= 'host'¶
-
USERNAME
= 'username'¶
-
CLIENT
= 'client'¶
-
MODELS
= 'models'¶
-
VERSION_NUMBER
= 'seurat_version_number'¶
-
LD_MODE
= 'LIVEDESIGN_MODE'¶
-
GLOBAL_PROJECT_ID
= '0'¶
-
LD_VERSION_CORP_ID_MATCHING
= Version(major=8, minor=1)¶
-
LD_VERSION_MULTIPLE_IDS
= Version(major=8, minor=1)¶
-
LD_VERSION_REAL_VIRTUAL
= Version(major=8, minor=2)¶
-
LD_VERSION_NEW_EXPORT
= Version(major=8, minor=7)¶
-
LD_VERSION_NEW_IMPORT
= Version(major=8, minor=9)¶
-
LD_VERSION_POSE_NAMES
= Version(major=8, minor=9)¶
-
__init__
(host='https://unit_test-8-5.dev.bb.schrodinger.com')[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
get_ld_client_and_models
()[source]¶ Return the stored
ldclient.client.LDClient
andldclient.models
mocks.Providing the same
LDClient
instance every time allows modifications to the “server state” (actually stored on theLDClient
mock) made in unit tests to be reflected in the modules in whichlogin
has been patched out withMockLogin
.
-
get_LD_version
(ld_client=None)[source]¶ - Parameters
ld_client (mock.Mock) – a mock of the
client.LDClient
class, with a properly-behavingabout()
method defined (optional)- Returns
the version of the supplied LD client instance
- Return type
-