def test_non_positive_str(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_UNITS_RETAIN_OLD_COUNT: '-1'})
     try:
         importer_config.validate_retain_old_count(config)
         self.fail()
     except ValueError, e:
         self.assertTrue(importer_constants.KEY_UNITS_RETAIN_OLD_COUNT in e[0])
         self.assertTrue('-1' in e[0])
Beispiel #2
0
 def test_non_positive_str(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_UNITS_RETAIN_OLD_COUNT: '-1'})
     try:
         importer_config.validate_retain_old_count(config)
         self.fail()
     except ValueError, e:
         self.assertTrue(importer_constants.KEY_UNITS_RETAIN_OLD_COUNT in e[0])
         self.assertTrue('-1' in e[0])
Beispiel #3
0
 def test_str(self):
     config = PluginCallConfiguration(
         {}, {importer_constants.KEY_UNITS_RETAIN_OLD_COUNT: '1'})
     importer_config.validate_retain_old_count(config)
Beispiel #4
0
 def test_optional(self):
     config = PluginCallConfiguration({}, {})
     importer_config.validate_retain_old_count(config)
 def test_str(self):
     config = PluginCallConfiguration({}, {importer_constants.KEY_UNITS_RETAIN_OLD_COUNT: '1'})
     importer_config.validate_retain_old_count(config)
 def test_optional(self):
     config = PluginCallConfiguration({}, {})
     importer_config.validate_retain_old_count(config)