def test_request_create(): req1= RequestReference(host=TESTING_CONFIG['host'], port=TESTING_CONFIG['port']) req2 = RequestReference(host=TESTING_CONFIG['host'], port=TESTING_CONFIG['port']) req2.create(sample='roman_sample', time=time.time(), uid=None, state='active', seq_num=0, foo='bar', hero='asterix', antihero='romans') req2.host = 'hail_caesar' pytest.raises(ConnectionError, req2.create, sample='roman_sample')
def test_request_create(): req1 = RequestReference(host=TESTING_CONFIG['host'], port=TESTING_CONFIG['port']) req2 = RequestReference(host=TESTING_CONFIG['host'], port=TESTING_CONFIG['port']) req2.create(sample='roman_sample', time=time.time(), uid=None, state='active', seq_num=0, foo='bar', hero='asterix', antihero='romans') req2.host = 'hail_caesar' pytest.raises(ConnectionError, req2.create, sample='roman_sample')
def test_req_connection_switch(): r = RequestReference() r.host = 'bogus_paigh' pytest.raises(ConnectionError, r.create, 'test') r.host = 'localhost' list(r.find())