By default, disable all caching in tests, to preserve test independence.
In order to enable caching, inherit from CacheSetupMixin, and specify
which cache configuration is needed.
[EV-32]
The TestCase API doesn't accept arguments, so passing arguments for some
TestCase subclasses makes adding new inheritance/mixins tricky. Instead,
prefer configuration via class attributes for TestCases.
Celery requires all tasks to be in a tasks module. Also, the task has been updated to use default values if the the course structure generator encounters a block without the graded or format fields.
This commit fixes a bug that could occur when GeoIP
returns a continent code ("EU" or "AN") instead of a
country code. The previous implementation would
block users in this case since the country code
was not on the whitelist (consisting of all known
country codes). The new implementation allows user
access by default if we don't recognize the country code.
The new "country access" implementation replaces the old
implementation. Middleware and tests have been updated
accordingly, but deprecated models are preserved
for backwards compatibility.
Add history table for course access rule changes.
Provide test utility for simulating restricted access.
Provide `redirect_if_blocked` method for integration with other
parts of the system (will be used for blocking enrollment).
Add info-level logging explaining when and why users are blocked.