Skip to content

Commit 6c63857

Browse files
authored
test: Delete flaky test test_rate_limiting_registration_view (#36491)
Deleted out of `RegistrationViewTestV1` although the failure was observed in `RegistrationViewTestV2` which inherits from it. Deleted according to flaky test process: https://openedx.atlassian.net/wiki/spaces/AC/pages/4306337795/Flaky+Test+Process Flaky test ticket: - #36490
1 parent 25ec03c commit 6c63857

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

openedx/core/djangoapps/user_authn/views/tests/test_register.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,38 +1857,6 @@ def _side_effect_for_get_value(value, default=None):
18571857
response = self.client.post(self.url, {"email": self.EMAIL, "username": self.USERNAME})
18581858
assert response.status_code == 403
18591859

1860-
@override_settings(
1861-
CACHES={
1862-
'default': {
1863-
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
1864-
'LOCATION': 'registration_proxy',
1865-
}
1866-
}
1867-
)
1868-
def test_rate_limiting_registration_view(self):
1869-
"""
1870-
Confirm rate limits work as expected for registration
1871-
end point.
1872-
Note that drf's rate limiting makes use of the default cache
1873-
to enforce limits; that's why this test needs a "real"
1874-
default cache (as opposed to the usual-for-tests DummyCache)
1875-
"""
1876-
payload = {
1877-
"email": 'email',
1878-
"name": self.NAME,
1879-
"username": self.USERNAME,
1880-
"password": self.PASSWORD,
1881-
"honor_code": "true",
1882-
}
1883-
1884-
for _ in range(int(settings.REGISTRATION_RATELIMIT.split('/')[0])):
1885-
response = self.client.post(self.url, payload)
1886-
assert response.status_code != 403
1887-
1888-
response = self.client.post(self.url, payload)
1889-
assert response.status_code == 403
1890-
cache.clear()
1891-
18921860
@override_settings(FEATURES=ENABLE_AUTO_GENERATED_USERNAME)
18931861
def test_register_with_auto_generated_username(self):
18941862
"""

0 commit comments

Comments
 (0)