Esempio n. 1
0
    def test_release_rt_cores(self, mock_cloud):
        req = RTCoreRequest('c1', 10, 1)

        mock_cloud.realtime.request.return_value = dict(request_id=10)

        req_id = req.request()
        req.release(req_id)

        mock_cloud.realtime.release.assert_called_once_with(req_id)
Esempio n. 2
0
    def test_release_rt_cores(self, mock_cloud):
        req = RTCoreRequest('c1', 10, 1)

        mock_cloud.realtime.request.return_value = dict(request_id=10)

        req_id = req.request()
        req.release(req_id)

        mock_cloud.realtime.release.assert_called_once_with(req_id)
Esempio n. 3
0
    def test_request(self, mock_cloud):
        req = RTCoreRequest('c1', 10, 1)

        mock_cloud.realtime.request.return_value = dict(request_id=10)

        req_id = req.request()

        mock_cloud.realtime.request.assert_called_once_with('c1', 10, 1)
        eq_(10, req_id)
Esempio n. 4
0
    def test_request(self, mock_cloud):
        req = RTCoreRequest('c1', 10, 1)

        mock_cloud.realtime.request.return_value = dict(request_id=10)

        req_id = req.request()

        mock_cloud.realtime.request.assert_called_once_with('c1', 10, 1)
        eq_(10, req_id)