Пример #1
0
 def test_invalid_server_call(self):
     with pytest.raises(Exception) as excinfo1:
         api.server_call(None, None)
     with pytest.raises(Exception) as excinfo2:
         api.server_call("GetVersion", None)
     assert "method" in str(excinfo1.value)
     assert "server" in str(excinfo2.value)
Пример #2
0
 def test_invalid_server_call(self):
     with pytest.raises(Exception) as excinfo1:
         api.server_call(None, None)
     with pytest.raises(Exception) as excinfo2:
         api.server_call('GetVersion', None)
     assert 'method' in str(excinfo1.value)
     assert 'server' in str(excinfo2.value)
Пример #3
0
 def test_invalid_server_call(self):
     with pytest.raises(Exception) as excinfo1:
         api.server_call(None, None)
     with pytest.raises(Exception) as excinfo2:
         api.server_call('GetVersion', None)
     assert 'method' in str(excinfo1.value)
     assert 'server' in str(excinfo2.value)
Пример #4
0
 def test_timeout(self):
     with pytest.raises(TimeoutException) as excinfo:
         api.server_call("GetVersion",
                         server="my36.geotab.com",
                         timeout=0.01)
     assert "Request timed out @ my36.geotab.com" in str(excinfo.value)
Пример #5
0
 def test_get_version(self):
     version = api.server_call("GetVersion", server="my3.geotab.com")
     version_split = version.split(".")
     assert len(version_split) == 4
Пример #6
0
 def test_timeout(self):
     with pytest.raises(TimeoutException) as excinfo:
         api.server_call('GetVersion', server='my36.geotab.com', timeout=0.01)
     assert 'Request timed out @ my36.geotab.com' in str(excinfo.value)
Пример #7
0
 def test_get_version(self):
     version = api.server_call('GetVersion', server='my3.geotab.com')
     version_split = version.split('.')
     assert len(version_split) == 4
Пример #8
0
 def test_timeout(self):
     with pytest.raises(TimeoutException) as excinfo:
         api.server_call('GetVersion',
                         server='my36.geotab.com',
                         timeout=0.01)
     assert 'Request timed out @ my36.geotab.com' in str(excinfo.value)
Пример #9
0
 def test_get_version(self):
     version = api.server_call('GetVersion', server='my3.geotab.com')
     version_split = version.split('.')
     assert len(version_split) == 4