forked from uw-it-aca/uw-restclients-r25
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from unittest import TestCase | ||
from uw_r25.dao import R25_DAO | ||
from commonconf import override_settings | ||
|
||
|
||
class R25TestDao(TestCase): | ||
|
||
def test_custom_headers(self): | ||
self.assertFalse(R25_DAO()._custom_headers('GET', '/', {}, None)) | ||
with override_settings(RESTCLIENTS_R25_BASIC_AUTH='b64here'): | ||
self.assertEquals( | ||
R25_DAO()._custom_headers('GET', '/', {}, None), | ||
{'Authorization': 'Basic b64here'} | ||
) |