feat(registry): add new endpoints for registers, exchange, and backups; update routing and configurations
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
This commit is contained in:
@@ -86,7 +86,7 @@ class LoginViewTest(APITestCase):
|
||||
self.password = fake.password(length=12, special_chars=False)
|
||||
self.user = UserFactory.create_user(password=self.password)
|
||||
|
||||
self.login_data = {"email": self.user.email, "password": self.password}
|
||||
self.login_data = {"username": self.user.username, "password": self.password}
|
||||
|
||||
def test_login_success(self):
|
||||
"""Test successful login"""
|
||||
@@ -109,7 +109,7 @@ class LoginViewTest(APITestCase):
|
||||
def test_login_nonexistent_user(self):
|
||||
"""Test login fails for nonexistent user"""
|
||||
data = {
|
||||
"email": fake.unique.email(),
|
||||
"username": fake.unique.user_name(),
|
||||
"password": fake.password(length=12, special_chars=False),
|
||||
}
|
||||
|
||||
@@ -302,14 +302,18 @@ class TokenRefreshViewTest(APITestCase):
|
||||
response = self.client.post(self.refresh_url, data, format="json")
|
||||
|
||||
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
|
||||
self.assertIn("error", response.data)
|
||||
self.assertTrue(
|
||||
"errors" in response.data
|
||||
or "detail" in response.data
|
||||
or "code" in response.data
|
||||
)
|
||||
|
||||
def test_refresh_token_missing(self):
|
||||
"""Test token refresh fails without refresh token"""
|
||||
response = self.client.post(self.refresh_url, {}, format="json")
|
||||
|
||||
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
|
||||
self.assertIn("error", response.data)
|
||||
self.assertTrue("errors" in response.data or "detail" in response.data)
|
||||
|
||||
|
||||
class ApiJwtOnlyAuthenticationTest(APITestCase):
|
||||
|
||||
Reference in New Issue
Block a user