Ejemplo n.º 1
0
 def test_validate_config_lists_ReturnsTrueIfExtraItem(self):
     system_item_list = default_system_item_list[:]
     system_item_list.append('MY_NEW_PARTITION/*')
     self.assertTrue(
         validate_config_lists(system_item_list,
                               default_system_misc_info_keys,
                               default_other_item_list))
 def test_validate_config_lists_ReturnsFalseIfMissingDefaultItem(self):
     framework_item_list = list(DEFAULT_FRAMEWORK_ITEM_LIST)
     framework_item_list.remove('SYSTEM/*')
     self.assertFalse(
         validate_config_lists(framework_item_list,
                               DEFAULT_FRAMEWORK_MISC_INFO_KEYS,
                               DEFAULT_VENDOR_ITEM_LIST))
 def test_validate_config_lists_ReturnsTrueIfExtraItem(self):
     framework_item_list = list(DEFAULT_FRAMEWORK_ITEM_LIST)
     framework_item_list.append('MY_NEW_PARTITION/*')
     self.assertTrue(
         validate_config_lists(framework_item_list,
                               DEFAULT_FRAMEWORK_MISC_INFO_KEYS,
                               DEFAULT_VENDOR_ITEM_LIST))
Ejemplo n.º 4
0
 def test_validate_config_lists_ReturnsFalseIfMissingDefaultItem(self):
     system_item_list = default_system_item_list[:]
     system_item_list.remove('SYSTEM/*')
     self.assertFalse(
         validate_config_lists(system_item_list,
                               default_system_misc_info_keys,
                               default_other_item_list))
Ejemplo n.º 5
0
 def test_validate_config_lists_ReturnsFalseIfSharedExtractedPartition(self):
   vendor_item_list = list(DEFAULT_VENDOR_ITEM_LIST)
   vendor_item_list.append('SYSTEM/my_system_file')
   self.assertFalse(
       validate_config_lists(DEFAULT_FRAMEWORK_ITEM_LIST,
                             DEFAULT_FRAMEWORK_MISC_INFO_KEYS,
                             vendor_item_list))
 def test_validate_config_lists_ReturnsFalseIfBadSystemMiscInfoKeys(self):
   for bad_key in ['dynamic_partition_list', 'super_partition_groups']:
     system_misc_info_keys = default_system_misc_info_keys[:]
     system_misc_info_keys.append(bad_key)
     self.assertFalse(
         validate_config_lists(default_system_item_list, system_misc_info_keys,
                               default_other_item_list))
 def test_validate_config_lists_ReturnsFalseIfBadSystemMiscInfoKeys(self):
     for bad_key in ['dynamic_partition_list', 'super_partition_groups']:
         framework_misc_info_keys = list(DEFAULT_FRAMEWORK_MISC_INFO_KEYS)
         framework_misc_info_keys.append(bad_key)
         self.assertFalse(
             validate_config_lists(DEFAULT_FRAMEWORK_ITEM_LIST,
                                   framework_misc_info_keys,
                                   DEFAULT_VENDOR_ITEM_LIST))
 def test_validate_config_lists_ReturnsTrueIfDefaultItemInDifferentList(self):
   system_item_list = default_system_item_list[:]
   system_item_list.remove('ROOT/*')
   other_item_list = default_other_item_list[:]
   other_item_list.append('ROOT/*')
   self.assertTrue(
       validate_config_lists(system_item_list, default_system_misc_info_keys,
                             other_item_list))
Ejemplo n.º 9
0
 def test_validate_config_lists_ReturnsTrueIfDefaultItemInDifferentList(self):
   framework_item_list = list(DEFAULT_FRAMEWORK_ITEM_LIST)
   framework_item_list.remove('ROOT/*')
   vendor_item_list = list(DEFAULT_VENDOR_ITEM_LIST)
   vendor_item_list.append('ROOT/*')
   self.assertTrue(
       validate_config_lists(framework_item_list,
                             DEFAULT_FRAMEWORK_MISC_INFO_KEYS,
                             vendor_item_list))