Skip to content

Commit

Permalink
test: fixed test for degreed 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MueezKhan246 committed Oct 11, 2023
1 parent f4f2de5 commit 0d64848
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def test_get(self, mock_current_request):
response = self.client.get(url)
data = json.loads(response.content.decode('utf-8'))
self.assertEqual(data.get('degreed_base_url'), self.degreed2_config.degreed_base_url)
self.assertEqual(data.get('client_id'), self.degreed2_config.client_id)
self.assertEqual(data.get('client_secret'), self.degreed2_config.client_secret)
self.assertEqual(data.get('decrypted_client_id'), self.degreed2_config.decrypted_client_id)
self.assertEqual(data.get('decrypted_client_secret'), self.degreed2_config.decrypted_client_secret)
self.assertEqual(data.get('degreed_token_fetch_base_url'), self.degreed2_config.degreed_token_fetch_base_url)
self.assertEqual(data.get('enterprise_customer'),
str(self.degreed2_config.enterprise_customer.uuid))
Expand All @@ -82,14 +82,14 @@ def test_update(self, mock_current_request):
'degreed_base_url': 'http://testing2',
'degreed_token_fetch_base_url': 'foobar',
'enterprise_customer': ENTERPRISE_ID,
'client_id': 'testing',
'client_secret': 'secret',
'encrypted_client_id': 'testing',
'encrypted_client_secret': 'secret',
}
response = self.client.put(url, payload)
self.degreed2_config.refresh_from_db()
self.assertEqual(self.degreed2_config.degreed_base_url, 'http://testing2')
self.assertEqual(self.degreed2_config.client_id, 'testing')
self.assertEqual(self.degreed2_config.client_secret, 'secret')
self.assertEqual(self.degreed2_config.decrypted_client_id, 'testing')
self.assertEqual(self.degreed2_config.decrypted_client_secret, 'secret')
self.assertEqual(self.degreed2_config.degreed_token_fetch_base_url, 'foobar')
self.assertEqual(str(self.degreed2_config.enterprise_customer.uuid), ENTERPRISE_ID)
self.assertEqual(response.status_code, 200)
Expand Down

0 comments on commit 0d64848

Please sign in to comment.