geonode.proxy.tests
This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run “manage.py test”.
Replace these with more appropriate tests for your application.
Attributes
Classes
Module Contents
- class geonode.proxy.tests.ProxyTest[source]
Bases:
geonode.tests.base.GeoNodeBaseTestSupport- test_validate_host_disabled_in_debug()[source]
If PROXY_ALLOWED_HOSTS is empty and DEBUG is True, all hosts pass the proxy.
- test_validate_host_disabled_not_in_debug()[source]
If PROXY_ALLOWED_HOSTS is empty and DEBUG is False requests should return 403.
- test_proxy_allowed_host()[source]
If PROXY_ALLOWED_HOSTS is not empty and DEBUG is False requests should return no error.
- test_validate_remote_services_hosts()[source]
If PROXY_ALLOWED_HOSTS is empty and DEBUG is False requests should return 200 for Remote Services hosts.
- test_relative_urls()[source]
Proxying to a URL with a relative path element should normalise the path into an absolute path before calling the remote URL.