Example #1
0
class MockGetLibraryInstance:
    libs = {
        "SeleniumLibrary": mock.Mock(),
        "cumulusci.robotframework.CumulusCI": CumulusCI(),
        "cumulusci.robotframework.Salesforce": mock.Mock(),
    }

    def __call__(self, libname):
        if libname in self.libs:
            return self.libs[libname]
        else:
            raise Exception("unknown library: {}".format(libname))
Example #2
0
def mock_builtin_get_library_instance(libname):
    if libname == "cumulusci.robotframework.CumulusCI":
        return CumulusCI()
    return mock.Mock()