Exemplo n.º 1
0
def test_create_process_token_from_dict(figo_session):
    data = {
        "task_token": "YmB-BtvbWufLnbwgAVfP7XfLatwhrtu0sATfnZNR7LGP-aLXiZ7BKzLdZI--EqEPnwh_"
                      "h6mCxToLEBhtA7LVd4uM4gTcZG8F6UJs47g6kWJ0"
    }
    task_token = TaskToken.from_dict(figo_session, data)
    assert isinstance(task_token, TaskToken)
Exemplo n.º 2
0
 def test_create_process_token_from_dict(self):
     data = {
         "task_token":
         "YmB-BtvbWufLnbwgAVfP7XfLatwhrtu0sATfnZNR7LGP-aLXiZ7BKzLdZI--EqEPnwh_h6mCxToLEBhtA7LVd4uM4gTcZG8F6UJs47g6kWJ0"
     }
     task_token = TaskToken.from_dict(self.sut, data)
     self.assertTrue(isinstance(task_token, TaskToken))
Exemplo n.º 3
0
def test_create_process_token_from_dict(figo_session):
    data = {
        "task_token": "YmB-BtvbWufLnbwgAVfP7XfLatwhrtu0sATfnZNR7LGP-aLXiZ7BKzLdZI--EqEPnwh_"
                      "h6mCxToLEBhtA7LVd4uM4gTcZG8F6UJs47g6kWJ0"
    }
    task_token = TaskToken.from_dict(figo_session, data)
    assert isinstance(task_token, TaskToken)
Exemplo n.º 4
0
 def test_cancel_task(self):
     # Valid task token needed
     task_token = TaskToken(self.sut)
     task_token.task_token = "invalidTaskToken"
     self.assertRaises(FigoException, self.sut.cancel_task, task_token)
Exemplo n.º 5
0
 def test_poll_task_state(self):
     # Valid task token needed
     task_token = TaskToken(self.sut)
     task_token.task_token = "invalidTaskToken"
     self.assertRaises(FigoException, self.sut.get_task_state, task_token)
Exemplo n.º 6
0
def test_cancel_task(figo_session):
    # Valid task token needed
    task_token = TaskToken(figo_session)
    task_token.task_token = "invalidTaskToken"
    with pytest.raises(FigoException):
        figo_session.cancel_task(task_token)
Exemplo n.º 7
0
def test_poll_task_state(figo_session):
    # Valid task token needed
    task_token = TaskToken(figo_session)
    task_token.task_token = "invalidTaskToken"
    with pytest.raises(FigoException):
        figo_session.get_task_state(task_token)
Exemplo n.º 8
0
 def test_cancel_task(self):
     # Valid task token needed
     task_token = TaskToken(self.sut)
     task_token.task_token = "invalidTaskToken"
     self.assertRaises(FigoException, self.sut.cancel_task, task_token)
Exemplo n.º 9
0
 def test_poll_task_state(self):
     # Valid task token needed
     task_token = TaskToken(self.sut)
     task_token.task_token = "invalidTaskToken"
     self.assertRaises(FigoException, self.sut.get_task_state, task_token)
Exemplo n.º 10
0
def test_start_task(demo_session):
    # Valid task token needed
    task_token = TaskToken(demo_session)
    task_token.task_token = "invalidTaskToken"
    with pytest.raises(FigoException):
        demo_session.start_task(task_token)
Exemplo n.º 11
0
 def test_create_process_token_from_dict(self):
     data = {
             "task_token": "YmB-BtvbWufLnbwgAVfP7XfLatwhrtu0sATfnZNR7LGP-aLXiZ7BKzLdZI--EqEPnwh_h6mCxToLEBhtA7LVd4uM4gTcZG8F6UJs47g6kWJ0"
             }
     task_token = TaskToken.from_dict(self.sut, data)
     self.assertTrue(isinstance(task_token, TaskToken))