Skip to content

Commit

Permalink
test for basic auth
Browse files Browse the repository at this point in the history
  • Loading branch information
btb committed Dec 15, 2017
1 parent 5b9578b commit bc101f4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions uw_r25/tests/test_dao.py
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'}
)

0 comments on commit bc101f4

Please sign in to comment.