def test_username_is_non_string(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_PROXY_USER: 185})
     try:
         importer_config.validate_proxy_username(config)
         self.fail()
     except ValueError, e:
         self.assertTrue('int' in e[0])
예제 #2
0
 def test_valid(self):
     config = PluginCallConfiguration(
         {}, {
             importer_constants.KEY_PROXY_PASS: '******',
             importer_constants.KEY_PROXY_USER: '******'
         })
     importer_config.validate_proxy_username(config)
예제 #3
0
 def test_username_is_non_string(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_PROXY_USER: 185})
     try:
         importer_config.validate_proxy_username(config)
         self.fail()
     except ValueError, e:
         self.assertTrue('int' in e[0])
 def test_password_no_username(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_PROXY_PASS: '******'})
     try:
         importer_config.validate_proxy_username(config)
         self.fail()
     except ValueError, e:
         self.assertTrue(importer_constants.KEY_PROXY_USER in e[0])
         self.assertTrue(importer_constants.KEY_PROXY_PASS in e[0])
예제 #5
0
 def test_password_no_username(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_PROXY_PASS: '******'})
     try:
         importer_config.validate_proxy_username(config)
         self.fail()
     except ValueError, e:
         self.assertTrue(importer_constants.KEY_PROXY_USER in e[0])
         self.assertTrue(importer_constants.KEY_PROXY_PASS in e[0])
예제 #6
0
 def test_optional(self):
     config = PluginCallConfiguration({}, {})
     importer_config.validate_proxy_username(config)
 def test_optional(self):
     config = PluginCallConfiguration({}, {})
     importer_config.validate_proxy_username(config)
 def test_valid(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_PROXY_PASS: '******',
                                           importer_constants.KEY_PROXY_USER: '******'})
     importer_config.validate_proxy_username(config)