예제 #1
0
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')
예제 #2
0
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')
예제 #3
0
def test_req_connection_switch():
    r = RequestReference()
    r.host = 'bogus_paigh'
    pytest.raises(ConnectionError, r.create, 'test')
    r.host = 'localhost'
    list(r.find())
예제 #4
0
def test_req_connection_switch():
    r = RequestReference()
    r.host = 'bogus_paigh'
    pytest.raises(ConnectionError, r.create, 'test')
    r.host = 'localhost'
    list(r.find())