def test_get_version_success(qtbot):
 http_stub = HTTPGetStub(success=True)
 client = autoupdate.PyPIVersionClient(client=http_stub)
 with qtbot.assertNotEmitted(client.error):
  with qtbot.waitSignal(client.success):
   client.get_version('test')
 assert (http_stub.url == QUrl('https://pypi.python.org/pypi/test/json'))

def test_get_version_success ( qtbot ) : http_stub = HTTPGetStub ( success = True ) client = autoupdate . PyPIVersionClient ( client = http_stub ) with qtbot . assertNotEmitted ( client . error ) : with qtbot . waitSignal ( client . success ) : client . get_version ( 'test' ) assert ( http_stub . url == QUrl ( 'https://pypi.python.org/pypi/test/json' ) )
test get_version() when success is emitted .