def test_get_authentication_header_with_api_key_param(self): """ Get authentication header with api key parameter """ controller = NURESTLoginController() controller.user = '******' controller.password = None controller.api_key = None self.assertEquals(controller.get_authentication_header(password='******') , 'XREST dXNlcm5hbWU6cGFzc3dvcmQ=')
def test_get_authentication_header_as_string(self): """ Get authentication header as string """ controller = NURESTLoginController() controller.user = '******' controller.password = '******' controller.api_key = None self.assertEquals(controller.get_authentication_header() , 'XREST dXNlcm5hbWU6cGFzc3dvcmQ=')
def test_get_authentication_header_as_string(self): """ Get authentication header as string """ controller = NURESTLoginController() controller.user = '******' controller.password = '******' controller.api_key = None self.assertEquals(controller.get_authentication_header() , 'XREST dXNlcm5hbWU6cGFzc3dvcmQ=')
def test_get_authentication_header_with_api_key(self): """ Get authentication header with api key """ controller = NURESTLoginController() controller.user = '******' controller.password = '******' controller.api_key = '123456' self.assertEquals(controller.get_authentication_header() , 'XREST dXNlcm5hbWU6MTIzNDU2')
def test_get_authentication_header_with_api_key_param(self): """ Get authentication header with api key parameter """ controller = NURESTLoginController() controller.user = '******' controller.password = None controller.api_key = None self.assertEquals(controller.get_authentication_header(password='******') , 'XREST dXNlcm5hbWU6cGFzc3dvcmQ=')
def test_get_authentication_header_with_api_key(self): """ Get authentication header with api key """ controller = NURESTLoginController() controller.user = '******' controller.password = '******' controller.api_key = '123456' self.assertEquals(controller.get_authentication_header() , 'XREST dXNlcm5hbWU6MTIzNDU2')
def test_get_authentication_header_with_api_key(self): """ Get authentication header with api key """ controller = NURESTLoginController() controller.user = '******' controller.password = None controller.api_key = '12345ABCD' header = controller.get_authentication_header() self.assertEquals(header, 'XREST Y2hyaXN0b3BoZToxMjM0NUFCQ0Q=')
def test_get_authentication_header_without_api_key(self): """ Get authentication header without api key """ controller = NURESTLoginController() controller.user = '******' controller.password = '******' controller.api_key = None header = controller.get_authentication_header() self.assertEquals(header, 'XREST Y2hyaXN0b3BoZTp0dUNyMElzS29pPw==')
def test_get_authentication_header_with_tilde(self): """ Get authentication header with tilde """ controller = NURESTLoginController() controller.user = '******' controller.password = '******' controller.api_key = None self.assertEquals(controller.get_authentication_header(), 'XREST dXNlcm5hbWU6cH5hc3N+d29yfmQ=')