@pytest.mark.parametrize('json', INVALID_JSON)
def test_invalid_json(qtbot, json):
 http_stub = HTTPGetStub(json=json)
 client = autoupdate.PyPIVersionClient(client=http_stub)
 client.get_version('test')
 with qtbot.assertNotEmitted(client.success):
  with qtbot.waitSignal(client.error):
   client.get_version('test')

@ pytest . mark . parametrize ( 'json' , INVALID_JSON ) def test_invalid_json ( qtbot , json ) : http_stub = HTTPGetStub ( json = json ) client = autoupdate . PyPIVersionClient ( client = http_stub ) client . get_version ( 'test' ) with qtbot . assertNotEmitted ( client . success ) : with qtbot . waitSignal ( client . error ) : client . get_version ( 'test' )
test on_client_success() with invalid json .