예제 #1
0
    def test_add_credentials_for_unsecure_authentication(self):
        """check username and key are really added to options"""

        config = load_config_file(self.root_path+'/domaintools/conf/api.ini')
        configuration = Configuration(config)
        configuration.secure_auth = False

        request = Request(configuration)
        request.add_credentials_options()

        options = request.get_options()

        self.assertTrue(config['username']==options['api_username'] and config['key']==options['api_key'])
예제 #2
0
    def test_add_credentials_for_unsecure_authentication(self):
        """check username and key are really added to options"""

        config = load_config_file(self.root_path + '/domaintools/conf/api.ini')
        configuration = Configuration(config)
        configuration.secure_auth = False

        request = Request(configuration)
        request.add_credentials_options()

        options = request.get_options()

        self.assertTrue(config['username'] == options['api_username']
                        and config['key'] == options['api_key'])