예제 #1
0
    def testDelete(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Delete.return_value = show_pb2.ShowDeleteResponse()
        getStubMock.return_value = stubMock

        show = opencue.wrappers.show.Show(show_pb2.Show(name=TEST_SHOW_NAME))
        show.delete()

        stubMock.Delete.assert_called_with(
            show_pb2.ShowDeleteRequest(show=show.data), timeout=mock.ANY)
예제 #2
0
    def testDeleteShow(self, getStubMock):
        arbitraryId = '00000000-0000-0000-0000-012345678980'
        showToDelete = show_pb2.Show(id=arbitraryId)
        stubMock = mock.Mock()
        stubMock.FindShow.return_value = show_pb2.ShowFindShowResponse(show=showToDelete)
        stubMock.Delete.return_value = show_pb2.ShowDeleteResponse()
        getStubMock.return_value = stubMock

        opencue.api.deleteShow(arbitraryId)

        stubMock.Delete.assert_called_with(
            show_pb2.ShowDeleteRequest(show=showToDelete), timeout=mock.ANY)