23 lines
703 B
Python
23 lines
703 B
Python
from rest_framework import status
|
|
|
|
from userausfall.rest_api.tests import UserausfallAPITestCase
|
|
from userausfall.tests import UserMixin
|
|
|
|
|
|
class TrustBridgeTestCase(UserMixin, UserausfallAPITestCase):
|
|
def test_retrieve_trust_bridge(self):
|
|
"""
|
|
Retrieve the trust bridge information of a user without an ldap account.
|
|
"""
|
|
url = "/trust-bridge/"
|
|
self.authenticate_user()
|
|
response = self.client.get(self.get_api_url(url))
|
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
|
self.assertEqual(
|
|
response.data,
|
|
{
|
|
"is_trusted": False,
|
|
"trust_giver": None,
|
|
},
|
|
)
|