def setShow(self, show): """Set the show for the owner. :type: str :param: name of the show""" self.stub.SetShow(host_pb2.OwnerSetShowRequest(owner=self.data, show=show), timeout=Cuebot.Timeout)
def testSetShow(self, getStubMock): stubMock = mock.Mock() stubMock.SetShow.return_value = host_pb2.OwnerSetShowResponse() getStubMock.return_value = stubMock owner = opencue.wrappers.owner.Owner( host_pb2.Owner(id=TEST_OWNER_ID, name=TEST_OWNER_NAME)) owner.setShow(TEST_SHOW_NAME) stubMock.SetShow.assert_called_with( host_pb2.OwnerSetShowRequest(owner=owner.data, show=TEST_SHOW_NAME), timeout=mock.ANY)