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'})
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'})