Пример #1
0
def chek():
    server_url = 'http://0.0.0.0:8080/'
    url = shortener.short_it('http://www.google.com.ua/')
    for i in range(1000):
        r = requests.get(server_url+url, allow_redirects=False)
        assert r.status_code == 301         
Пример #2
0
def chek():
    server_url = 'http://0.0.0.0:8080/'
    url = shortener.short_it('http://www.google.com.ua/')
    for i in range(1000):
        r = requests.get(server_url + url, allow_redirects=False)
        assert r.status_code == 301
Пример #3
0
def chek():
    server_url = 'http://0.0.0.0:8080/'
    url = shortener.short_it('nic.to')
    print url
    r = requests.get(server_url+url, allow_redirects=False)
    assert r.status_code == 301     
Пример #4
0
def chek():
    server_url = 'http://0.0.0.0:8080/'
    url = shortener.short_it('nic.to')
    print url
    r = requests.get(server_url + url, allow_redirects=False)
    assert r.status_code == 301