NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

test_neocomInventoryBadging.py (25054B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\inventory\test\test_neocomInventoryBadging.py
      2 from carbon.common.lib.const import ixItemID, ixOwnerID, ixLocationID, ixFlag
      3 from eve.common.lib.appConst import locationAbstract, locationRAMInstalledItems, locationJunkyard
      4 import inventorycommon.const as invconst
      5 from mock import Mock, patch
      6 from testhelpers.evemocks import SMMock
      7 from testsuites.testcases import ClientTestCase
      8 from unittest import main
      9 SOLAR_SYSTEM_ID = 30005042
     10 STATION_ID = 60001327
     11 MY_SHIP_ID = 1000000123235L
     12 ANOTHER_SHIP_ID = 1000000124167L
     13 CHAR_ID_1 = 90000001
     14 CHAR_ID_2 = 2112001018
     15 
     16 class KeyValMock(object):
     17 
     18     def __init__(self, **kw):
     19         self.__dict__ = kw
     20 
     21     def get(self, key, defval = None):
     22         return self.__dict__.get(key, defval)
     23 
     24 
     25 class ItemStorageMock(object):
     26 
     27     def __init__(self, unseen_item_ids):
     28         self.unseen_items = unseen_item_ids
     29 
     30     def get_unseen(self):
     31         return self.unseen_items
     32 
     33 
     34 class ItemMock(object):
     35     __slots__ = ('itemID', 'typeID', 'ownerID', 'locationID', 'flagID', 'quantity', 'groupID', 'categoryID', 'customInfo', 'stacksize', 'singleton')
     36 
     37     def __init__(self, itemID, typeID, ownerID, locationID, flagID, quantity, groupID, categoryID, customInfo, stacksize, singleton):
     38         self.itemID = itemID
     39         self.typeID = typeID
     40         self.ownerID = ownerID
     41         self.locationID = locationID
     42         self.flagID = flagID
     43         self.quantity = quantity
     44         self.groupID = groupID
     45         self.categoryID = categoryID
     46         self.customInfo = customInfo
     47         self.stacksize = stacksize
     48         self.singleton = singleton
     49 
     50 
     51 class InventoryBadgingTestCase(ClientTestCase):
     52 
     53     def setUp(self):
     54         super(InventoryBadgingTestCase, self).setUp()
     55         self._mock_globals()
     56         with patch.dict('sys.modules', self._mock_imported_modules()):
     57             from eve.client.script.ui.shared.inventory.neocomInventoryBadging import NeocomInventoryBadging
     58             self.badging = NeocomInventoryBadging(inventory_cache=Mock(), neocom=Mock())
     59             self.badging.is_inventory_window_open = Mock(return_value=False)
     60 
     61     def _mock_globals(self):
     62         import __builtin__
     63         session_mock = Mock()
     64         session_mock.shipid = MY_SHIP_ID
     65         __builtin__.session = session_mock
     66         __builtin__.settings = Mock()
     67         __builtin__.sm = SMMock()
     68 
     69     def _mock_imported_modules(self):
     70         imported_modules = {'blue': Mock(),
     71          'carbon.common.script.util.timerstuff': Mock(),
     72          'eve.client.script.environment.invCache': Mock(),
     73          'eve.client.script.ui.shared.inventory.invWindow': Mock(),
     74          'eve.client.script.ui.shared.neocom.neocom.btnData.btnDataNodeNotification': Mock(),
     75          'eve.client.script.ui.shared.neocom.neocom.fixedButtonExtension': Mock(),
     76          'eve.client.script.ui.shared.neocom.neocom.neocomConst': Mock(),
     77          'localization': Mock(),
     78          'log': Mock()}
     79         return imported_modules
     80 
     81     def _check_triggers_badging(self, change, item):
     82         self.assertTrue(self.badging.is_badging_triggered(change, item, is_local_change=True))
     83 
     84     def _check_does_not_trigger_badging(self, change, item):
     85         self.assertFalse(self.badging.is_badging_triggered(change, item, is_local_change=True))
     86 
     87     def test_no_badging_if_item_manually_moved_from_cargo_to_item_hangar(self):
     88         change = {ixLocationID: MY_SHIP_ID,
     89          ixFlag: invconst.flagCargo}
     90         item = ItemMock(itemID=1000000123391L, typeID=invconst.typeThrasherCombatCrate, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupSpecialEditionCommodities, categoryID=invconst.categorySpecialEditionAssets, customInfo='', stacksize=1, singleton=0)
     91         self._check_does_not_trigger_badging(change, item)
     92 
     93     def test_badging_if_item_redeemed(self):
     94         change = {ixLocationID: locationAbstract}
     95         item = ItemMock(itemID=1000000123399L, typeID=invconst.typeThrasherCombatCrate, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupSpecialEditionCommodities, categoryID=invconst.categorySpecialEditionAssets, customInfo=None, stacksize=1, singleton=0)
     96         self._check_triggers_badging(change, item)
     97 
     98     def test_badging_if_ship_redeemed(self):
     99         change = {ixLocationID: locationAbstract}
    100         item = ItemMock(itemID=1000000123400L, typeID=invconst.typeMerlin, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupFrigate, categoryID=invconst.categoryShip, customInfo=None, stacksize=1, singleton=0)
    101         self._check_triggers_badging(change, item)
    102 
    103     def test_badging_if_blueprint_copy_redeemed(self):
    104         change = {ixLocationID: locationAbstract}
    105         item = ItemMock(itemID=1000000140926L, typeID=invconst.typeGnosisBlueprint, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=-2, groupID=invconst.groupBattlecruiserBlueprint, categoryID=invconst.categoryBlueprint, customInfo=None, stacksize=1, singleton=2)
    106         self._check_triggers_badging(change, item)
    107 
    108     def test_badging_if_item_created_via_slash(self):
    109         change = {ixLocationID: locationAbstract}
    110         item = ItemMock(itemID=1000000123401L, typeID=invconst.typeThrasherCombatCrate, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupSpecialEditionCommodities, categoryID=invconst.categorySpecialEditionAssets, customInfo=None, stacksize=1, singleton=0)
    111         self._check_triggers_badging(change, item)
    112 
    113     def test_badging_when_crate_is_opened(self):
    114         change = {invconst.ixStackSize: 1}
    115         item = ItemMock(itemID=1000000123422L, typeID=invconst.typeA3DestroyerCrate, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=0, groupID=invconst.groupSpecialEditionCommodities, categoryID=invconst.categorySpecialEditionAssets, customInfo=None, stacksize=0, singleton=0)
    116         self._check_does_not_trigger_badging(change, item)
    117         change = {ixLocationID: locationAbstract}
    118         item = ItemMock(itemID=1000000123423L, typeID=invconst.typeSunesis, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupDestroyer, categoryID=invconst.categoryShip, customInfo=None, stacksize=1, singleton=0)
    119         self._check_triggers_badging(change, item)
    120         change = {ixLocationID: locationAbstract}
    121         item = ItemMock(itemID=1000000123424L, typeID=invconst.typeDamageControlI, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupDamageControl, categoryID=invconst.categoryModule, customInfo=None, stacksize=1, singleton=0)
    122         self._check_triggers_badging(change, item)
    123         change = {ixLocationID: locationAbstract}
    124         item = ItemMock(itemID=1000000123425L, typeID=invconst.typeTahronCustomHeatSink, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupHeatSink, categoryID=invconst.categoryModule, customInfo=None, stacksize=1, singleton=0)
    125         self._check_triggers_badging(change, item)
    126 
    127     def test_badging_if_item_bought_in_lp_store(self):
    128         change = {ixLocationID: locationAbstract}
    129         item = ItemMock(itemID=1000000123427L, typeID=invconst.typeLimitedMemoryAugmentation, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupCyberLearning, categoryID=invconst.categoryImplant, customInfo=None, stacksize=1, singleton=0)
    130         self._check_triggers_badging(change, item)
    131 
    132     def test_badging_if_item_bought_from_market(self):
    133         change = {ixLocationID: locationAbstract}
    134         item = ItemMock(itemID=1000000123428L, typeID=invconst.typeLimitedMemoryAugmentation, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupCyberLearning, categoryID=invconst.categoryImplant, customInfo=None, stacksize=1, singleton=0)
    135         self._check_triggers_badging(change, item)
    136 
    137     def test_badging_if_item_acquired_from_contract(self):
    138         item_id = 1000000123428L
    139         contract_item_id = 1000000123429L
    140         change = {ixOwnerID: invconst.ownerSystem,
    141          ixLocationID: contract_item_id,
    142          ixFlag: invconst.flagNone}
    143         item = ItemMock(itemID=item_id, typeID=invconst.typeLimitedMemoryAugmentation, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupCyberLearning, categoryID=invconst.categoryImplant, customInfo=None, stacksize=1, singleton=0)
    144         self._check_triggers_badging(change, item)
    145 
    146     def test_badging_if_item_acquired_from_trade(self):
    147         item_id = 1000000123431L
    148         trade_item_id = 1000000123430L
    149         previous_owner_id = CHAR_ID_2
    150         owner_id = CHAR_ID_1
    151         change = {ixOwnerID: previous_owner_id,
    152          ixLocationID: trade_item_id}
    153         item = ItemMock(itemID=item_id, typeID=invconst.typeLimitedMemoryAugmentation, ownerID=owner_id, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupCyberLearning, categoryID=invconst.categoryImplant, customInfo=None, stacksize=1, singleton=0)
    154         self._check_triggers_badging(change, item)
    155 
    156     def test_badging_if_item_manufactured(self):
    157         blueprint_item_id = 1000000123432L
    158         item_id = 1000000123434L
    159         change = {ixLocationID: locationRAMInstalledItems}
    160         item = ItemMock(itemID=blueprint_item_id, typeID=invconst.type1MNCivilianAfterburnerBlueprint, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=-1, groupID=invconst.groupPropulsionModuleBlueprint, categoryID=invconst.categoryBlueprint, customInfo='', stacksize=1, singleton=1)
    161         self._check_does_not_trigger_badging(change, item)
    162         change = {ixLocationID: locationAbstract}
    163         item = ItemMock(itemID=item_id, typeID=invconst.type1MNCivilianAfterburner, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=-1, groupID=invconst.groupPropulsionModule, categoryID=invconst.categoryModule, customInfo=None, stacksize=1, singleton=0)
    164         self._check_triggers_badging(change, item)
    165 
    166     def test_badging_if_item_given_in_mission(self):
    167         change = {ixLocationID: locationAbstract}
    168         item = ItemMock(itemID=1000000123436L, typeID=invconst.typeCratesOfCoolant, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=3, groupID=invconst.groupMiscellaneous, categoryID=invconst.categoryCommodity, customInfo=None, stacksize=3, singleton=0)
    169         self._check_triggers_badging(change, item)
    170 
    171     def test_no_badging_if_ore_mined(self):
    172         change = {ixLocationID: locationAbstract}
    173         item = ItemMock(itemID=1000000123441L, typeID=invconst.typeVeldspar, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=72, groupID=invconst.groupVeldspar, categoryID=invconst.categoryAsteroid, customInfo=KeyValMock(isMined=True), stacksize=72, singleton=0)
    174         self._check_does_not_trigger_badging(change, item)
    175 
    176     def test_no_badging_if_ship_assembled(self):
    177         change = {invconst.ixSingleton: 0}
    178         item = ItemMock(itemID=1000000118245L, typeID=invconst.typeMerlin, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagHangar, quantity=-1, groupID=invconst.groupFrigate, categoryID=invconst.categoryShip, customInfo='', stacksize=1, singleton=1)
    179         self._check_does_not_trigger_badging(change, item)
    180 
    181     def test_no_badging_if_ship_repackaged(self):
    182         ship_item_id_before = 1000000118245L
    183         ship_item_id_after = 1000000123443L
    184         self.badging.get_tracked_item_storage = Mock(return_value=ItemStorageMock(unseen_item_ids=[]))
    185         change = {ixLocationID: STATION_ID}
    186         item = ItemMock(itemID=ship_item_id_before, typeID=invconst.typeMerlin, ownerID=CHAR_ID_1, locationID=locationJunkyard, flagID=invconst.flagHangar, quantity=-1, groupID=invconst.groupFrigate, categoryID=invconst.categoryShip, customInfo='', stacksize=1, singleton=1)
    187         self._check_does_not_trigger_badging(change, item)
    188         change = {ixItemID: ship_item_id_before,
    189          ixOwnerID: invconst.ownerSystem,
    190          ixLocationID: locationAbstract}
    191         item = ItemMock(itemID=ship_item_id_after, typeID=invconst.typeMerlin, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupFrigate, categoryID=invconst.categoryShip, customInfo='', stacksize=1, singleton=0)
    192         self._check_does_not_trigger_badging(change, item)
    193 
    194     def test_no_badging_if_stack_split(self):
    195         original_stack_item_id = 1000000123444L
    196         new_stack_item_id = 1000000123445L
    197         self.badging.get_tracked_item_storage = Mock(return_value=ItemStorageMock(unseen_item_ids=[]))
    198         change = {ixItemID: original_stack_item_id,
    199          ixLocationID: locationAbstract}
    200         item = ItemMock(itemID=new_stack_item_id, typeID=invconst.typeVeldspar, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupVeldspar, categoryID=invconst.categoryAsteroid, customInfo=None, stacksize=1, singleton=0)
    201         self._check_does_not_trigger_badging(change, item)
    202         change = {invconst.ixStackSize: 2}
    203         item = ItemMock(itemID=original_stack_item_id, typeID=invconst.typeVeldspar, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupVeldspar, categoryID=invconst.categoryAsteroid, customInfo=None, stacksize=1, singleton=0)
    204         self._check_does_not_trigger_badging(change, item)
    205 
    206     def test_no_badging_if_swapping_ammo(self):
    207         item_id_original_ammo_iron = 1000000123454L
    208         item_id_new_ammo_tungsten = 1000000123453L
    209         change = {ixLocationID: locationAbstract}
    210         item = ItemMock(itemID=item_id_original_ammo_iron, typeID=invconst.typeIronChargeS, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=80, groupID=invconst.groupHybridAmmo, categoryID=invconst.categoryCharge, customInfo=KeyValMock(isAmmo=True), stacksize=80, singleton=0)
    211         self._check_does_not_trigger_badging(change, item)
    212         change = {invconst.ixStackSize: 80}
    213         item = ItemMock(itemID=item_id_new_ammo_tungsten, typeID=invconst.typeTungstenChargeS, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=0, groupID=invconst.groupHybridAmmo, categoryID=invconst.categoryCharge, customInfo=None, stacksize=0, singleton=0)
    214         self._check_does_not_trigger_badging(change, item)
    215         change = {ixLocationID: None,
    216          ixFlag: None}
    217         item = ItemMock(itemID=(MY_SHIP_ID, invconst.flagHiSlot0, invconst.typeTungstenChargeS), typeID=invconst.typeTungstenChargeS, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagHiSlot0, quantity=0, groupID=invconst.groupHybridAmmo, categoryID=invconst.categoryCharge, customInfo=None, stacksize=0, singleton=0)
    218         self._check_does_not_trigger_badging(change, item)
    219         change = {ixLocationID: None,
    220          ixFlag: None}
    221         item = ItemMock(itemID=(MY_SHIP_ID, invconst.flagHiSlot0, invconst.typeTungstenChargeS), typeID=invconst.typeTungstenChargeS, ownerID=None, locationID=MY_SHIP_ID, flagID=invconst.flagHiSlot0, quantity=0, groupID=invconst.groupHybridAmmo, categoryID=invconst.categoryCharge, customInfo=1, stacksize=0, singleton=0)
    222         self._check_does_not_trigger_badging(change, item)
    223         change = {invconst.ixStackSize: 0.0}
    224         item = ItemMock(itemID=(MY_SHIP_ID, invconst.flagHiSlot0, invconst.typeTungstenChargeS), typeID=invconst.typeTungstenChargeS, ownerID=None, locationID=MY_SHIP_ID, flagID=invconst.flagHiSlot0, quantity=80, groupID=invconst.groupHybridAmmo, categoryID=invconst.categoryCharge, customInfo=None, stacksize=80, singleton=0)
    225         self._check_does_not_trigger_badging(change, item)
    226 
    227     def test_no_badging_if_swapping_crystal_ammo(self):
    228         item_id_original_ammo_ultraviolet = 1000000123458L
    229         item_id_new_ammo_gamma = 1000000123457L
    230         change = {ixFlag: invconst.flagHiSlot0}
    231         item = ItemMock(itemID=item_id_original_ammo_ultraviolet, typeID=invconst.typeUltravioletS, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=1, groupID=invconst.groupFrequencyCrystal, categoryID=invconst.categoryCharge, customInfo=None, stacksize=1, singleton=0)
    232         self._check_does_not_trigger_badging(change, item)
    233         change = {ixFlag: invconst.flagCargo}
    234         item = ItemMock(itemID=item_id_new_ammo_gamma, typeID=invconst.typeGammaS, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagHiSlot0, quantity=1, groupID=invconst.groupFrequencyCrystal, categoryID=invconst.categoryCharge, customInfo=None, stacksize=1, singleton=0)
    235         self._check_does_not_trigger_badging(change, item)
    236 
    237     def test_no_badging_if_loading_damageable_crystal_ammo_from_stack(self):
    238         aurora_stack_in_cargo_item_id = 1000000140921L
    239         aurora_loaded_item_id = 1000000140923L
    240         change = {invconst.ixStackSize: 2}
    241         item = ItemMock(itemID=aurora_stack_in_cargo_item_id, typeID=invconst.typeAuroraL, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=1, groupID=invconst.groupAdvancedBeamLaserCrystal, categoryID=invconst.categoryCharge, customInfo=None, stacksize=1, singleton=0)
    242         self._check_does_not_trigger_badging(change, item)
    243         change = {ixLocationID: 0}
    244         item = ItemMock(itemID=aurora_loaded_item_id, typeID=invconst.typeAuroraL, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=-1, groupID=invconst.groupAdvancedBeamLaserCrystal, categoryID=invconst.categoryCharge, customInfo=KeyValMock(isAmmo=True), stacksize=1, singleton=1)
    245         self._check_does_not_trigger_badging(change, item)
    246         change = {ixFlag: invconst.flagCargo}
    247         item = ItemMock(itemID=aurora_loaded_item_id, typeID=invconst.typeAuroraL, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagHiSlot0, quantity=-1, groupID=invconst.groupAdvancedBeamLaserCrystal, categoryID=invconst.categoryCharge, customInfo=None, stacksize=1, singleton=1)
    248         self._check_does_not_trigger_badging(change, item)
    249 
    250     def test_no_badging_if_probe_retracted(self):
    251         item_id_retracted_probe = 1000000123462L
    252         item_id_deployed_probe = 9000007165000001595L
    253         change = {ixLocationID: locationAbstract}
    254         item = ItemMock(itemID=item_id_retracted_probe, typeID=invconst.typeCombatScannerProbeI, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=1, groupID=invconst.groupScannerProbe, categoryID=invconst.categoryCharge, customInfo=(MY_SHIP_ID, MY_SHIP_ID), stacksize=1, singleton=0)
    255         self._check_does_not_trigger_badging(change, item)
    256         change = {ixLocationID: SOLAR_SYSTEM_ID}
    257         item = ItemMock(itemID=item_id_deployed_probe, typeID=invconst.typeCombatScannerProbeI, ownerID=CHAR_ID_1, locationID=locationJunkyard, flagID=invconst.flagNone, quantity=-1, groupID=invconst.groupScannerProbe, categoryID=invconst.categoryCharge, customInfo=(MY_SHIP_ID, MY_SHIP_ID), stacksize=1, singleton=1)
    258         self._check_does_not_trigger_badging(change, item)
    259 
    260     def test_no_badging_if_probe_retracted_on_stargate_jump(self):
    261         retracted_probe_item_id = 1000000140505L
    262         launched_probe_item_id = 9000007250000001843L
    263         change = {ixLocationID: locationAbstract}
    264         item = ItemMock(itemID=retracted_probe_item_id, typeID=invconst.typeCoreScannerProbe, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=1, groupID=invconst.groupScannerProbe, categoryID=invconst.categoryCharge, customInfo=(MY_SHIP_ID, MY_SHIP_ID), stacksize=1, singleton=0)
    265         self._check_does_not_trigger_badging(change, item)
    266         change = {ixLocationID: SOLAR_SYSTEM_ID}
    267         item = ItemMock(itemID=launched_probe_item_id, typeID=invconst.typeCoreScannerProbe, ownerID=CHAR_ID_1, locationID=locationJunkyard, flagID=invconst.flagNone, quantity=-1, groupID=invconst.groupScannerProbe, categoryID=invconst.categoryCharge, customInfo=(MY_SHIP_ID, MY_SHIP_ID), stacksize=1, singleton=1)
    268         self._check_does_not_trigger_badging(change, item)
    269 
    270     def test_no_badging_if_item_is_consumed(self):
    271         change = {invconst.ixStackSize: 25}
    272         item = ItemMock(itemID=1000000123469L, typeID=invconst.typeLiquidOzone, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=0, groupID=invconst.groupIceProduct, categoryID=invconst.categoryMaterial, customInfo=None, stacksize=0, singleton=0)
    273         self._check_does_not_trigger_badging(change, item)
    274 
    275     def test_no_badging_if_booster_is_consumed(self):
    276         change = {invconst.ixSingleton: 0}
    277         item = ItemMock(itemID=1000000124286L, typeID=invconst.typeQABooster, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=-1, groupID=invconst.groupBooster, categoryID=invconst.categoryImplant, customInfo=None, stacksize=1, singleton=1)
    278         self._check_does_not_trigger_badging(change, item)
    279         change = {ixLocationID: STATION_ID,
    280          ixFlag: invconst.flagHangar}
    281         item = ItemMock(itemID=1000000124286L, typeID=invconst.typeQABooster, ownerID=CHAR_ID_1, locationID=CHAR_ID_1, flagID=invconst.flagBooster, quantity=-1, groupID=invconst.groupBooster, categoryID=invconst.categoryImplant, customInfo=None, stacksize=1, singleton=1)
    282         self._check_does_not_trigger_badging(change, item)
    283 
    284     def test_no_badging_if_item_is_unspawned(self):
    285         change = {ixLocationID: MY_SHIP_ID}
    286         item = ItemMock(itemID=1000000123472L, typeID=invconst.typeVeldspar, ownerID=CHAR_ID_1, locationID=locationJunkyard, flagID=invconst.flagCargo, quantity=1, groupID=invconst.groupVeldspar, categoryID=invconst.categoryAsteroid, customInfo=None, stacksize=1, singleton=0)
    287         self._check_does_not_trigger_badging(change, item)
    288 
    289     def test_no_badging_if_item_unfitted(self):
    290         change = {ixLocationID: MY_SHIP_ID,
    291          ixFlag: invconst.flagMedSlot0}
    292         item = ItemMock(itemID=1000000123519L, typeID=invconst.type1MNCivilianAfterburner, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=-1, groupID=invconst.groupPropulsionModule, categoryID=invconst.categoryModule, customInfo=None, stacksize=1, singleton=1)
    293         self._check_does_not_trigger_badging(change, item)
    294 
    295     def test_no_badging_if_wreck_salvaged(self):
    296         change = {ixLocationID: locationAbstract}
    297         item = ItemMock(itemID=1000000123970L, typeID=invconst.typeMetalScraps, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=1, groupID=invconst.groupCommodities, categoryID=invconst.categoryCommodity, customInfo=KeyValMock(isSalvaged=True), stacksize=1, singleton=0)
    298         self._check_does_not_trigger_badging(change, item)
    299 
    300     def test_no_badging_if_my_drone_scooped(self):
    301         change = {ixLocationID: SOLAR_SYSTEM_ID,
    302          ixFlag: invconst.flagNone}
    303         item = ItemMock(itemID=1000000124245L, typeID=invconst.typeWarriorII, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=-1, groupID=invconst.groupCombatDrone, categoryID=invconst.categoryDrone, customInfo=(MY_SHIP_ID, None), stacksize=1, singleton=1)
    304         self._check_does_not_trigger_badging(change, item)
    305 
    306     def test_no_badging_if_not_my_drone_scooped(self):
    307         change = {ixOwnerID: CHAR_ID_2,
    308          ixLocationID: SOLAR_SYSTEM_ID,
    309          ixFlag: invconst.flagNone}
    310         item = ItemMock(itemID=1000000124245L, typeID=invconst.typeWarriorII, ownerID=CHAR_ID_1, locationID=MY_SHIP_ID, flagID=invconst.flagCargo, quantity=-1, groupID=invconst.groupCombatDrone, categoryID=invconst.categoryDrone, customInfo=(ANOTHER_SHIP_ID, None), stacksize=1, singleton=1)
    311         self._check_does_not_trigger_badging(change, item)
    312 
    313     def test_no_badging_if_item_moved_from_inactive_ship_cargo(self):
    314         change = {ixLocationID: ANOTHER_SHIP_ID,
    315          ixFlag: invconst.flagCargo}
    316         item = ItemMock(itemID=1000000124321L, typeID=invconst.typeVeldspar, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagCargo, quantity=1, groupID=invconst.groupVeldspar, categoryID=invconst.categoryAsteroid, customInfo=None, stacksize=1, singleton=0)
    317         self._check_does_not_trigger_badging(change, item)
    318 
    319     def test_no_badging_if_plex_withdrawn_from_vault(self):
    320         change = {ixLocationID: locationAbstract}
    321         item = ItemMock(itemID=1000000141792L, typeID=invconst.typePlex, ownerID=CHAR_ID_1, locationID=STATION_ID, flagID=invconst.flagHangar, quantity=1, groupID=invconst.groupCurrency, categoryID=invconst.categoryAccessories, customInfo=KeyValMock(isPlexFromVault=True), stacksize=1, singleton=0)
    322         self._check_does_not_trigger_badging(change, item)
    323 
    324 
    325 if __name__ == '__main__':
    326     main()