def test_purge_url(requests):
    nm = NginxManager()
    nm.purge('/test/')
    requests.request.assert_called_with('PURGE', 'http://localhost:80/test/')
示例#2
0
def test_purge_url(requests):
    nm = NginxManager()
    nm.purge('/test/')
    requests.request.assert_called_with('PURGE', 'http://localhost:80/test/')
def test_purge_url_override_host_header(requests):
    nm = NginxManager()
    nm.purge('/test/')
    requests.request.assert_called_with('PURGE', 'http://localhost:80/test/', headers={'Host':'foo.com'})
示例#4
0
def test_purge_url_override_host_header(requests):
    nm = NginxManager()
    nm.purge('/test/')
    requests.request.assert_called_with('PURGE',
                                        'http://localhost:80/test/',
                                        headers={'Host': 'foo.com'})