from tests import TableTestGroup EFT_TABLE = TableTestGroup(parse_eft) EFT_TABLE.add_test('''[Rifter, Fleet Tackle] Nanofiber Internal Structure I Nanofiber Internal Structure I Overdrive Injector System I Stasis Webifier I Warp Disruptor I 1MN Microwarpdrive I 200mm AutoCannon I, EMP S 200mm AutoCannon I, EMP S 200mm AutoCannon I, EMP S [empty high slot] [empty high slot] Garde I x5 ''', ({'modules': [{'ammo': 'EMP S', 'name': '200mm AutoCannon I', 'quantity': 3}, {'name': '1MN Microwarpdrive I', 'quantity': 1}, {'name': 'Garde I', 'quantity': 5}, {'name': 'Nanofiber Internal Structure I', 'quantity': 2}, {'name': 'Overdrive Injector System I', 'quantity': 1}, {'name': 'Stasis Webifier I', 'quantity': 1}, {'name': 'Warp Disruptor I', 'quantity': 1}], 'name': 'Fleet Tackle', 'ship': 'Rifter'}, [])) EFT_TABLE.add_test(''' [Apocalypse, Pimpin' Sniper Fit]
""" tests.parsers.cargo_scan ~~~~~~~~~~~~~~~~~~~~~~~~ Cargo Scan table tests """ from evepaste import parse_cargo_scan from tests import TableTestGroup CARGO_SCAN_TABLE = TableTestGroup(parse_cargo_scan) CARGO_SCAN_TABLE.add_test( """1 Minmatar Shuttle 2 Gallente Shuttle""", ([{"name": "Gallente Shuttle", "quantity": 2}, {"name": "Minmatar Shuttle", "quantity": 1}], []), ) CARGO_SCAN_TABLE.add_test("\n\n1 Minmatar Shuttle", ([{"name": "Minmatar Shuttle", "quantity": 1}], [])) CARGO_SCAN_TABLE.add_test( "10 Minmatar Shuttle\n2 Gallente Shuttle", ([{"name": "Gallente Shuttle", "quantity": 2}, {"name": "Minmatar Shuttle", "quantity": 10}], []), ) CARGO_SCAN_TABLE.add_test("10 200mm Afterburner", ([{"name": "200mm Afterburner", "quantity": 10}], [])) CARGO_SCAN_TABLE.add_test( "10 Plagioclase Mining Crystal I Blueprint (Original)", ([{"name": "Plagioclase Mining Crystal I Blueprint", "quantity": 10, "details": "BLUEPRINT ORIGINAL"}], []), ) CARGO_SCAN_TABLE.add_test( "10 Plagioclase Mining Crystal I Blueprint (Copy)", ([{"name": "Plagioclase Mining Crystal I Blueprint", "quantity": 10, "details": "BLUEPRINT COPY"}], []), )
VIEW_CONTENTS_TABLE.add_test( ''' 1600mm Reinforced Steel Plates II\tArmor Reinforcer\tLow Slot\t1 100MN Microwarpdrive II\tPropulsion Module\tMedium Slot\t1 Bouncer II\tCombat Drone\tDrone Bay\t1 Bouncer II\tCombat Drone\tDrone Bay\t1 Nitrogen Isotopes\tIce Product\tFuel Bay\t20000 Drone Link Augmentor II\tDrone Control Range Module\tHigh Slot\t1 Large Micro Jump Drive\tMicro Jump Drive\tCargo Hold\t1 Tengu Defensive - Adaptive Shielding\tDefensive Systems\tSubsystem\t1 Large Trimark Armor Pump I\tRig Armor\tRig Slot\t1 Medium Electrochemical Capacitor Booster I\tCapacitor Booster\tMedium Slot\t1 Giant Secure Container\tSecure Cargo Container\t\t1''', ([{ 'group': u'Propulsion Module', 'location': u'Medium Slot', 'name': u'100MN Microwarpdrive II', 'quantity': 1 }, { 'group': u'Armor Reinforcer', 'location': u'Low Slot', 'name': u'1600mm Reinforced Steel Plates II', 'quantity': 1 }, { 'group': u'Combat Drone', 'location': u'Drone Bay', 'name': u'Bouncer II', 'quantity': 2 }, { 'group': u'Drone Control Range Module', 'location': u'High Slot', 'name': u'Drone Link Augmentor II', 'quantity': 1 }, { 'group': u'Secure Cargo Container', 'location': u'', 'name': u'Giant Secure Container', 'quantity': 1 }, { 'group': u'Micro Jump Drive', 'location': u'Cargo Hold', 'name': u'Large Micro Jump Drive', 'quantity': 1 }, { 'group': u'Rig Armor', 'location': u'Rig Slot', 'name': u'Large Trimark Armor Pump I', 'quantity': 1 }, { 'group': u'Capacitor Booster', 'location': u'Medium Slot', 'name': u'Medium Electrochemical Capacitor Booster I', 'quantity': 1 }, { 'group': u'Ice Product', 'location': u'Fuel Bay', 'name': u'Nitrogen Isotopes', 'quantity': 20000 }, { 'group': u'Defensive Systems', 'location': u'Subsystem', 'name': u'Tengu Defensive - Adaptive Shielding', 'quantity': 1 }], []))
KILLMAIL_TABLE.add_test( '''2013.06.15 17:28:00 Victim: Some poor victim Corp: Victim's Corp Name Alliance: Victim's Alliance Name Faction: Unknown Destroyed: Scimitar System: Jita Security: 0.9 Damage Taken: 14194 Involved parties: Name: Ganker Name (laid the final blow) Security: -1.00 Corp: Ganker Corp Alliance: Ganker Alliance Faction: Unknown Ship: Apocalypse Navy Issue Weapon: Mega Pulse Laser II Damage Done: 14194 Name: Ganker Name2 Security: -10.00 Corp: Ganker Corp Alliance: Ganker Alliance Faction: Unknown Ship: Rifter Weapon: Some tiny little gun Damage Done: 0 Destroyed items: Medium Armor Maintenance Bot I, Qty: 3 (Drone Bay) Tengu Engineering - Capacitor Regeneration Matrix Power Diagnostic System II (Cargo) Dropped items: Warrior II (Drone Bay)''', ({ 'destroyed': [{ 'location': 'Drone Bay', 'name': 'Medium Armor Maintenance Bot I', 'quantity': 3 }, { 'name': 'Tengu Engineering - Capacitor Regeneration Matrix', 'location': None, 'quantity': 1 }, { 'location': 'Cargo', 'name': 'Power Diagnostic System II', 'quantity': 1 }], 'dropped': [{ 'location': 'Drone Bay', 'name': 'Warrior II', 'quantity': 1 }], 'involved': [{ 'alliance': 'Ganker Alliance', 'corp': 'Ganker Corp', 'damage_done': 14194, 'faction': 'Unknown', 'name': 'Ganker Name', 'security': '-1.00', 'ship': 'Apocalypse Navy Issue', 'weapon': 'Mega Pulse Laser II', 'killing_blow': True }, { 'alliance': 'Ganker Alliance', 'corp': 'Ganker Corp', 'damage_done': 0, 'faction': 'Unknown', 'name': 'Ganker Name2', 'security': '-10.00', 'ship': 'Rifter', 'weapon': 'Some tiny little gun', 'killing_blow': False }], 'time': '2013.06.15 17:28:00', 'victim': { 'alliance': "Victim's Alliance Name", 'corp': "Victim's Corp Name", 'damage_taken': '14194', 'destroyed': 'Scimitar', 'faction': 'Unknown', 'security': '0.9', 'system': 'Jita', 'victim': 'Some poor victim' } }, []))
KILLMAIL_TABLE.add_test( '''2013.06.15 17:28:00 Victim: Some poor victim Corp: Victim's Corp Name Alliance: Victim's Alliance Name Faction: Unknown Destroyed: Scimitar System: Jita Security: 0.9 Damage Taken: 14194 Involved parties: Name: Ganker Name (laid the final blow) Security: -1.00 Corp: Ganker Corp Alliance: Ganker Alliance Faction: Unknown Ship: Apocalypse Navy Issue Weapon: Mega Pulse Laser II Damage Done: 14194 Name: Ganker Name2 Security: -10.00 Corp: Ganker Corp Alliance: Ganker Alliance Faction: Unknown Ship: Rifter Weapon: Some tiny little gun Damage Done: 0 Destroyed items: Medium Armor Maintenance Bot I, Qty: 3 (Drone Bay) Tengu Engineering - Capacitor Regeneration Matrix Power Diagnostic System II (Cargo) Dropped items: Warrior II (Drone Bay)''', ({ 'destroyed': [{'location': 'Drone Bay', 'name': 'Medium Armor Maintenance Bot I', 'quantity': 3}, {'name': 'Tengu Engineering - Capacitor Regeneration Matrix', 'location': None, 'quantity': 1}, {'location': 'Cargo', 'name': 'Power Diagnostic System II', 'quantity': 1}], 'dropped': [{'location': 'Drone Bay', 'name': 'Warrior II', 'quantity': 1}], 'involved': [{'alliance': 'Ganker Alliance', 'corp': 'Ganker Corp', 'damage_done': 14194, 'faction': 'Unknown', 'name': 'Ganker Name', 'security': '-1.00', 'ship': 'Apocalypse Navy Issue', 'weapon': 'Mega Pulse Laser II', 'killing_blow': True}, {'alliance': 'Ganker Alliance', 'corp': 'Ganker Corp', 'damage_done': 0, 'faction': 'Unknown', 'name': 'Ganker Name2', 'security': '-10.00', 'ship': 'Rifter', 'weapon': 'Some tiny little gun', 'killing_blow': False}], 'time': '2013.06.15 17:28:00', 'victim': {'alliance': "Victim's Alliance Name", 'corp': "Victim's Corp Name", 'damage_taken': '14194', 'destroyed': 'Scimitar', 'faction': 'Unknown', 'security': '0.9', 'system': 'Jita', 'victim': 'Some poor victim'}}, []))
""" tests.parsers.chat ~~~~~~~~~~~~~~~~~~ Chat transcript table tests """ from evepaste import parse_chat from tests import TableTestGroup CHAT_TABLE = TableTestGroup(parse_chat) CHAT_TABLE.add_test( '[01:46:33] Some Dude > Look, a <url=showinfo:587>Rifter</url>', ({'lines': [{'author': 'Some Dude', 'message': 'Look, a <url=showinfo:587>Rifter</url>', 'time': '01:46:33'}], 'items': [{'name': 'Rifter', 'id': 587}]}, [])) CHAT_TABLE.add_test( '''[01:46:33] Some Dude > Look, a <url=showinfo:587>Rifter</url> [01:46:40] Guy123 > How many <url=showinfo:587>Rifter</url>s? [01:46:41] Some Dude > 2. ''', ({'items': [{'id': 587, 'name': 'Rifter'}], 'lines': [{'author': 'Some Dude', 'message': 'Look, a <url=showinfo:587>Rifter</url>', 'time': '01:46:33'}, {'author': 'Guy123', 'message': 'How many <url=showinfo:587>Rifter</url>s?', 'time': '01:46:40'}, {'author': 'Some Dude', 'message': '2.', 'time': '01:46:41'}]},
""" tests.parsers.chat ~~~~~~~~~~~~~~~~~~ Chat transcript table tests """ from evepaste import parse_chat from tests import TableTestGroup CHAT_TABLE = TableTestGroup(parse_chat) CHAT_TABLE.add_test( '[01:46:33] Some Dude > Look, a <url=showinfo:587>Rifter</url>', ({ 'lines': [{ 'author': 'Some Dude', 'message': 'Look, a <url=showinfo:587>Rifter</url>', 'time': '01:46:33' }], 'items': [{ 'name': 'Rifter', 'id': 587 }] }, [])) CHAT_TABLE.add_test( '''[01:46:33] Some Dude > Look, a <url=showinfo:587>Rifter</url> [01:46:40] Guy123 > How many <url=showinfo:587>Rifter</url>s? [01:46:41] Some Dude > 2. ''', ({ 'items': [{ 'id': 587, 'name': 'Rifter' }],
""" from evepaste import parse_dscan from tests import TableTestGroup DSCAN_TABLE = TableTestGroup(parse_dscan) DSCAN_TABLE.add_test( '''+\tNoctis\t3,225 m +\tThrasher\t12 km some dude's Stabber Fleet Issue\tStabber Fleet Issue\t- Wreck\tTayra\t82 km''', ([{ 'item_name': '+', 'distance': '3,225 m', 'name': 'Noctis' }, { 'item_name': '+', 'distance': '12 km', 'name': 'Thrasher' }, { 'item_name': "some dude's Stabber Fleet Issue", 'distance': '-', 'name': 'Stabber Fleet Issue' }, { 'item_name': 'Wreck', 'distance': '82 km', 'name': 'Tayra' }], [])) DSCAN_TABLE.add_test(u'test\tNoctis\t3\xc2\xa0225 m', ([{ 'item_name': 'test', 'name': 'Noctis', 'distance': '3225 m' }], []))
FITTING_TABLE.add_test( '''High power 5x Heavy Missile Launcher II Medium power 1x Large Shield Extender II 1x Dread Guristas EM Ward Amplifier 1x Domination 100MN Afterburner 1x Phased Muon Sensor Disruptor I 2x Adaptive Invulnerability Field II Low power Low power 1x Damage Control II 1x Reactor Control Unit II 3x Ballistic Control System II Rig Slot 1x Medium Ancillary Current Router I 2x Medium Core Defense Field Extender I Sub System 1x Tengu Offensive - Accelerated Ejection Bay 1x Tengu Propulsion - Fuel Catalyst 1x Tengu Defensive - Supplemental Screening 1x Tengu Electronics - Dissolution Sequencer 1x Tengu Engineering - Capacitor Regeneration Matrix Charges 8,718x Caldari Navy Scourge Heavy Missile 1x Targeting Range Dampening Script Drones 12 Warrior II Fuel Helium Isotopes''', ([{ 'name': u'Adaptive Invulnerability Field II', 'quantity': 2 }, { 'name': u'Ballistic Control System II', 'quantity': 3 }, { 'name': u'Caldari Navy Scourge Heavy Missile', 'quantity': 8718 }, { 'name': u'Damage Control II', 'quantity': 1 }, { 'name': u'Domination 100MN Afterburner', 'quantity': 1 }, { 'name': u'Dread Guristas EM Ward Amplifier', 'quantity': 1 }, { 'name': u'Heavy Missile Launcher II', 'quantity': 5 }, { 'name': u'Helium Isotopes', 'quantity': 1 }, { 'name': u'Large Shield Extender II', 'quantity': 1 }, { 'name': u'Medium Ancillary Current Router I', 'quantity': 1 }, { 'name': u'Medium Core Defense Field Extender I', 'quantity': 2 }, { 'name': u'Phased Muon Sensor Disruptor I', 'quantity': 1 }, { 'name': u'Reactor Control Unit II', 'quantity': 1 }, { 'name': u'Targeting Range Dampening Script', 'quantity': 1 }, { 'name': u'Tengu Defensive - Supplemental Screening', 'quantity': 1 }, { 'name': u'Tengu Electronics - Dissolution Sequencer', 'quantity': 1 }, { 'name': u'Tengu Engineering - Capacitor Regeneration Matrix', 'quantity': 1 }, { 'name': u'Tengu Offensive - Accelerated Ejection Bay', 'quantity': 1 }, { 'name': u'Tengu Propulsion - Fuel Catalyst', 'quantity': 1 }, { 'name': u'Warrior II', 'quantity': 12 }], []))
""" tests.parsers.bill_of_material ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Asset list table tests """ from evepaste import parse_bill_of_materials from tests import TableTestGroup BOM_TABLE = TableTestGroup(parse_bill_of_materials) BOM_TABLE.add_test('Zydrine - [You: 12783 - Perfect: 11625]', ([{'perfect': 11625, 'you': 12783, 'name': 'Zydrine'}], [])) BOM_TABLE.add_test('Tritanium [899052]', ([{'name': 'Tritanium', 'quantity': 899052}], [])) BOM_TABLE.add_test(''' Bill of Materials does not take into consideration the efficiency of an \ installation. Extra Materials are not affected by skills and are not returned when \ recycling the manufactured product. Isogen - [You: 1313] Megacyte - [You: 3124 - Perfect: 2841] Mexallon - [You: 731960 - Perfect: 665650] Nocxium - [You: 50170 - Perfect: 45625] Pyerite - [You: 3274449 - Perfect: 2977809] Tritanium - [You: 11903378 - Perfect: 10825023]
""" tests.parsers.cargo_scan ~~~~~~~~~~~~~~~~~~~~~~~~ Cargo Scan table tests """ from evepaste import parse_cargo_scan from tests import TableTestGroup CARGO_SCAN_TABLE = TableTestGroup(parse_cargo_scan) CARGO_SCAN_TABLE.add_test('''1 Minmatar Shuttle 2 Gallente Shuttle''', ([{ 'name': 'Gallente Shuttle', 'quantity': 2 }, { 'name': 'Minmatar Shuttle', 'quantity': 1 }], [])) CARGO_SCAN_TABLE.add_test('\n\n1 Minmatar Shuttle', ([{ 'name': 'Minmatar Shuttle', 'quantity': 1 }], [])) CARGO_SCAN_TABLE.add_test('10 Minmatar Shuttle\n2 Gallente Shuttle', ([{ 'name': 'Gallente Shuttle', 'quantity': 2 }, { 'name': 'Minmatar Shuttle', 'quantity': 10 }], [])) CARGO_SCAN_TABLE.add_test('10 200mm Afterburner', ([{
""" tests.parsers.cargo_scan ~~~~~~~~~~~~~~~~~~~~~~~~ Cargo Scan table tests """ from evepaste import parse_cargo_scan from tests import TableTestGroup CARGO_SCAN_TABLE = TableTestGroup(parse_cargo_scan) CARGO_SCAN_TABLE.add_test('''1 Minmatar Shuttle 2 Gallente Shuttle''', ([{'name': 'Gallente Shuttle', 'quantity': 2}, {'name': 'Minmatar Shuttle', 'quantity': 1}], [])) CARGO_SCAN_TABLE.add_test('\n\n1 Minmatar Shuttle', ([{'name': 'Minmatar Shuttle', 'quantity': 1}], [])) CARGO_SCAN_TABLE.add_test('10 Minmatar Shuttle\n2 Gallente Shuttle', ([{'name': 'Gallente Shuttle', 'quantity': 2}, {'name': 'Minmatar Shuttle', 'quantity': 10}], [])) CARGO_SCAN_TABLE.add_test( '10 200mm Afterburner', ([{'name': '200mm Afterburner', 'quantity': 10}], [])) CARGO_SCAN_TABLE.add_test( '10 Plagioclase Mining Crystal I Blueprint (Original)', ([{'name': 'Plagioclase Mining Crystal I Blueprint', 'quantity': 10, 'details': 'BLUEPRINT ORIGINAL'}], [])) CARGO_SCAN_TABLE.add_test('10 Plagioclase Mining Crystal I Blueprint (Copy)', ([{'name': 'Plagioclase Mining Crystal I Blueprint', 'quantity': 10, 'details': 'BLUEPRINT COPY'}], []))
""" tests.parsers.assets ~~~~~~~~~~~~~~~~~~~~ Asset list table tests """ from evepaste import parse_assets from tests import TableTestGroup ASSET_TABLE = TableTestGroup(parse_assets) ASSET_TABLE.add_test('Hurricane\t1\tCombat Battlecruiser\t\t\t15,000 m3', ([{'category': '', 'slot': None, 'group': 'Combat Battlecruiser', 'name': 'Hurricane', 'volume': '15,000 m3', 'size': '', 'tech_level': None, 'meta_level': None, 'quantity': 1}], [])) ASSET_TABLE.add_test(''' 720mm Gallium Cannon\t1\tProjectile Weapon\tMedium\tHigh\t10 m3 Damage Control II\t1\tDamage Control\t\tLow\t5 m3 Experimental 10MN Microwarpdrive I\t1\tPropulsion Module\t\tMedium\t10 m3''', ([{'category': 'Medium', 'slot': 'High', 'group': 'Projectile Weapon', 'name': '720mm Gallium Cannon', 'volume': '10 m3', 'size': None, 'tech_level': None,
""" tests.parsers.assets ~~~~~~~~~~~~~~~~~~~~ Asset list table tests """ from evepaste import parse_assets from tests import TableTestGroup ASSET_TABLE = TableTestGroup(parse_assets) ASSET_TABLE.add_test('Hurricane\t1\tCombat Battlecruiser\t\t\t15,000 m3', ([{ 'category': '', 'slot': None, 'group': 'Combat Battlecruiser', 'name': 'Hurricane', 'volume': '15,000 m3', 'size': '', 'tech_level': None, 'meta_level': None, 'quantity': 1 }], [])) ASSET_TABLE.add_test( ''' 720mm Gallium Cannon\t1\tProjectile Weapon\tMedium\tHigh\t10 m3 Damage Control II\t1\tDamage Control\t\tLow\t5 m3 Experimental 10MN Microwarpdrive I\t1\tPropulsion Module\t\tMedium\t10 m3''', ([{ 'category': 'Medium', 'slot': 'High', 'group': 'Projectile Weapon', 'name': '720mm Gallium Cannon',
EFT_TABLE.add_test( '''[Rifter, Fleet Tackle] Nanofiber Internal Structure I Nanofiber Internal Structure I Overdrive Injector System I Stasis Webifier I Warp Disruptor I 1MN Microwarpdrive I 200mm AutoCannon I, EMP S 200mm AutoCannon I, EMP S 200mm AutoCannon I, EMP S [empty high slot] [empty high slot] Garde I x5 ''', ({ 'modules': [{ 'ammo': 'EMP S', 'name': '200mm AutoCannon I', 'quantity': 3 }, { 'name': '1MN Microwarpdrive I', 'quantity': 1 }, { 'name': 'Garde I', 'quantity': 5 }, { 'name': 'Nanofiber Internal Structure I', 'quantity': 2 }, { 'name': 'Overdrive Injector System I', 'quantity': 1 }, { 'name': 'Stasis Webifier I', 'quantity': 1 }, { 'name': 'Warp Disruptor I', 'quantity': 1 }], 'name': 'Fleet Tackle', 'ship': 'Rifter' }, []))
FITTING_TABLE.add_test( """High power 5x Heavy Missile Launcher II Medium power 1x Large Shield Extender II 1x Dread Guristas EM Ward Amplifier 1x Domination 100MN Afterburner 1x Phased Muon Sensor Disruptor I 2x Adaptive Invulnerability Field II Low power Low power 1x Damage Control II 1x Reactor Control Unit II 3x Ballistic Control System II Rig Slot 1x Medium Ancillary Current Router I 2x Medium Core Defense Field Extender I Sub System 1x Tengu Offensive - Accelerated Ejection Bay 1x Tengu Propulsion - Fuel Catalyst 1x Tengu Defensive - Supplemental Screening 1x Tengu Electronics - Dissolution Sequencer 1x Tengu Engineering - Capacitor Regeneration Matrix Charges 8,718x Caldari Navy Scourge Heavy Missile 1x Targeting Range Dampening Script Drones 12 Warrior II Fuel Helium Isotopes""", ( [ {"name": u"Adaptive Invulnerability Field II", "quantity": 2}, {"name": u"Ballistic Control System II", "quantity": 3}, {"name": u"Caldari Navy Scourge Heavy Missile", "quantity": 8718}, {"name": u"Damage Control II", "quantity": 1}, {"name": u"Domination 100MN Afterburner", "quantity": 1}, {"name": u"Dread Guristas EM Ward Amplifier", "quantity": 1}, {"name": u"Heavy Missile Launcher II", "quantity": 5}, {"name": u"Helium Isotopes", "quantity": 1}, {"name": u"Large Shield Extender II", "quantity": 1}, {"name": u"Medium Ancillary Current Router I", "quantity": 1}, {"name": u"Medium Core Defense Field Extender I", "quantity": 2}, {"name": u"Phased Muon Sensor Disruptor I", "quantity": 1}, {"name": u"Reactor Control Unit II", "quantity": 1}, {"name": u"Targeting Range Dampening Script", "quantity": 1}, {"name": u"Tengu Defensive - Supplemental Screening", "quantity": 1}, {"name": u"Tengu Electronics - Dissolution Sequencer", "quantity": 1}, {"name": u"Tengu Engineering - Capacitor Regeneration Matrix", "quantity": 1}, {"name": u"Tengu Offensive - Accelerated Ejection Bay", "quantity": 1}, {"name": u"Tengu Propulsion - Fuel Catalyst", "quantity": 1}, {"name": u"Warrior II", "quantity": 12}, ], [], ), )
""" tests.parsers.industry ~~~~~~~~~~~~~~~~~~~~~~ Industry table tests """ from evepaste import parse_industry from tests import TableTestGroup INDUSTRY_TABLE = TableTestGroup(parse_industry) INDUSTRY_TABLE.add_test('''Tritanium (4662 Units) Pyerite (1857 Units) Mexallon (1027 Units) Isogen (44 Units) Nocxium (51 Units)''', ([ {'name': 'Isogen', 'quantity': 44}, {'name': 'Mexallon', 'quantity': 1027}, {'name': 'Nocxium', 'quantity': 51}, {'name': 'Pyerite', 'quantity': 1857}, {'name': 'Tritanium', 'quantity': 4662}], [])) INDUSTRY_TABLE.add_test('''Strontuim Clathrates (1 Unit)''', ([{'name': 'Strontuim Clathrates', 'quantity': 1}], []))
""" tests.parsers.listing ~~~~~~~~~~~~~~~~~~~~~~~~ Listing table tests """ from evepaste import parse_listing from tests import TableTestGroup LISTING_TABLE = TableTestGroup(parse_listing) LISTING_TABLE.add_test('Minmatar Shuttle', ([{'name': 'Minmatar Shuttle', 'quantity': 1}], [])) LISTING_TABLE.add_test('10x Minmatar Shuttle', ([{'name': 'Minmatar Shuttle', 'quantity': 10}], [])) LISTING_TABLE.add_test('Minmatar Shuttle x 10', ([{'name': 'Minmatar Shuttle', 'quantity': 10}], [])) LISTING_TABLE.add_test(', Heavy Assault Missile Launcher II,', ([{'name': 'Heavy Assault Missile Launcher II,', 'quantity': 1}], [])) LISTING_TABLE.add_test('Heavy Assault Missile Launcher II 10', ([{'name': 'Heavy Assault Missile Launcher II', 'quantity': 10}], []))
""" from evepaste import parse_industry from tests import TableTestGroup INDUSTRY_TABLE = TableTestGroup(parse_industry) INDUSTRY_TABLE.add_test( '''Tritanium (4662 Units) Pyerite (1857 Units) Mexallon (1027 Units) Isogen (44 Units) Nocxium (51 Units)''', ([{ 'name': 'Isogen', 'quantity': 44 }, { 'name': 'Mexallon', 'quantity': 1027 }, { 'name': 'Nocxium', 'quantity': 51 }, { 'name': 'Pyerite', 'quantity': 1857 }, { 'name': 'Tritanium', 'quantity': 4662 }], [])) INDUSTRY_TABLE.add_test('''Strontuim Clathrates (1 Unit)''', ([{ 'name': 'Strontuim Clathrates', 'quantity': 1 }], []))
""" tests.parsers.listing ~~~~~~~~~~~~~~~~~~~~~~~~ Listing table tests """ from evepaste import parse_listing from tests import TableTestGroup LISTING_TABLE = TableTestGroup(parse_listing) LISTING_TABLE.add_test('Minmatar Shuttle', ([{'name': 'Minmatar Shuttle', 'quantity': 1}], [])) LISTING_TABLE.add_test('10x Minmatar Shuttle', ([{'name': 'Minmatar Shuttle', 'quantity': 10}], [])) LISTING_TABLE.add_test('Minmatar Shuttle x 10', ([{'name': 'Minmatar Shuttle', 'quantity': 10}], [])) LISTING_TABLE.add_test(', Heavy Assault Missile Launcher II,', ([{'name': 'Heavy Assault Missile Launcher II,', 'quantity': 1}], [])) LISTING_TABLE.add_test('Heavy Assault Missile Launcher II 10', ([{'name': 'Heavy Assault Missile Launcher II', 'quantity': 10}], [])) # Test large quantities LISTING_TABLE.add_test("9'584'701 x Tritanium", ([{'name': 'Tritanium', 'quantity': 9584701}], [])) LISTING_TABLE.add_test( '''9'584'701 x Tritanium 2'036'800 x Pyerite 546'300 x Mexallon 149'580 x Isogen
""" tests.parsers.parse ~~~~~~~~~~~~~~~~~~~ Parse table tests """ from evepaste import parse, Unparsable from tests import TableTestGroup PARSE_TABLE = TableTestGroup(parse) PARSE_TABLE.add_test('''10 rifter \t\t\t\t\t\t\t\t\t\t''', ('cargo_scan', [{'name': 'rifter', 'quantity': 10}], ['\t\t\t\t\t\t\t\t\t\t'])) PARSE_TABLE.add_test('10 rifter\r\n', ('cargo_scan', [{'name': 'rifter', 'quantity': 10}], [])) PARSE_TABLE.add_test('', Unparsable)
SURVEY_SCANNER_TABLE.add_test( '''Pyroxeres\t1,919\t5,842 m Pyroxeres\t11,595\t7,180 m Pyroxeres\t5,414\t6,134 m Scordite Veldspar Veldspar\t10\t12 km Veldspar\t26,644\t6,115 m Veldspar\t26,935\t12 km ''', ([{ 'distance': '5,842 m', 'name': 'Pyroxeres', 'quantity': 1919 }, { 'distance': '7,180 m', 'name': 'Pyroxeres', 'quantity': 11595 }, { 'distance': '6,134 m', 'name': 'Pyroxeres', 'quantity': 5414 }, { 'distance': '12 km', 'name': 'Veldspar', 'quantity': 10 }, { 'distance': '6,115 m', 'name': 'Veldspar', 'quantity': 26644 }, { 'distance': '12 km', 'name': 'Veldspar', 'quantity': 26935 }], []))
VIEW_CONTENTS_TABLE.add_test( ''' 1600mm Reinforced Steel Plates II\tArmor Reinforcer\tLow Slot\t1 100MN Microwarpdrive II\tPropulsion Module\tMedium Slot\t1 Bouncer II\tCombat Drone\tDrone Bay\t1 Bouncer II\tCombat Drone\tDrone Bay\t1 Nitrogen Isotopes\tIce Product\tFuel Bay\t20000 Drone Link Augmentor II\tDrone Control Range Module\tHigh Slot\t1 Large Micro Jump Drive\tMicro Jump Drive\tCargo Hold\t1 Tengu Defensive - Adaptive Shielding\tDefensive Systems\tSubsystem\t1 Large Trimark Armor Pump I\tRig Armor\tRig Slot\t1 Medium Electrochemical Capacitor Booster I\tCapacitor Booster\tMedium Slot\t1 Giant Secure Container\tSecure Cargo Container\t\t1''', ([{'group': u'Propulsion Module', 'location': u'Medium Slot', 'name': u'100MN Microwarpdrive II', 'quantity': 1}, {'group': u'Armor Reinforcer', 'location': u'Low Slot', 'name': u'1600mm Reinforced Steel Plates II', 'quantity': 1}, {'group': u'Combat Drone', 'location': u'Drone Bay', 'name': u'Bouncer II', 'quantity': 2}, {'group': u'Drone Control Range Module', 'location': u'High Slot', 'name': u'Drone Link Augmentor II', 'quantity': 1}, {'group': u'Secure Cargo Container', 'location': u'', 'name': u'Giant Secure Container', 'quantity': 1}, {'group': u'Micro Jump Drive', 'location': u'Cargo Hold', 'name': u'Large Micro Jump Drive', 'quantity': 1}, {'group': u'Rig Armor', 'location': u'Rig Slot', 'name': u'Large Trimark Armor Pump I', 'quantity': 1}, {'group': u'Capacitor Booster', 'location': u'Medium Slot', 'name': u'Medium Electrochemical Capacitor Booster I', 'quantity': 1}, {'group': u'Ice Product', 'location': u'Fuel Bay', 'name': u'Nitrogen Isotopes', 'quantity': 20000}, {'group': u'Defensive Systems', 'location': u'Subsystem', 'name': u'Tengu Defensive - Adaptive Shielding', 'quantity': 1}], []))
""" tests.parsers.loot_history ~~~~~~~~~~~~~~~~~~~~~~~~~~ Loot history table tests """ from evepaste import parse_loot_history from tests import TableTestGroup LOOT_HISTORY_TABLE = TableTestGroup(parse_loot_history) LOOT_HISTORY_TABLE.add_test('''03:21:19 Some dude has looted 5 x Garde II''', ([{ 'time': '03:21:19', 'player_name': 'Some dude', 'quantity': 5, 'name': 'Garde II' }], [])) LOOT_HISTORY_TABLE.add_test( '''03:21:19 Some dude has looted 5 x Garde II 04:22:20 Some dude has looted 5 x Garde II''', ([{ 'time': '03:21:19', 'player_name': 'Some dude', 'quantity': 5, 'name': 'Garde II' }, { 'time': '04:22:20', 'player_name': 'Some dude', 'quantity': 5, 'name': 'Garde II' }], [])) LOOT_HISTORY_TABLE.add_test('Garde II', ([], ['Garde II']))
""" tests.parsers.contract ~~~~~~~~~~~~~~~~~~~~~~ Contract table tests """ from evepaste import parse_contract from tests import TableTestGroup CONTRACT_TABLE = TableTestGroup(parse_contract) CONTRACT_TABLE.add_test('Rokh\t1\tBattleship\tShip\t', ([{'name': 'Rokh', 'quantity': 1, 'type': 'Battleship', 'category': 'Ship', 'details': '', 'fitted': False}], [])) CONTRACT_TABLE.add_test('''Rokh\t1\tBattleship\tShip\t Large Core Defense Field Extender I\t1\tRig Shield\tModule\tFitted''', ([{'category': 'Module', 'details': 'Fitted', 'fitted': True, 'name': 'Large Core Defense Field Extender I', 'quantity': 1, 'type': 'Rig Shield'}, {'category': 'Ship', 'details': '', 'fitted': False, 'name': 'Rokh', 'quantity': 1,
tests.parsers.planetary_interaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ planetary interaction list table tests """ from evepaste import parse_pi from tests import TableTestGroup PI_TABLE = TableTestGroup(parse_pi) PI_TABLE.add_test( '''331.0\tAqueous Liquids\tNot routed 331\tAqueous Liquids\tRouted''', ([{ 'routed': False, 'name': 'Aqueous Liquids', 'quantity': 331 }, { 'routed': True, 'name': 'Aqueous Liquids', 'quantity': 331 }], [])) PI_TABLE.add_test('''\tAqueous Liquids\t305.0\t3.05''', ([{ 'volume': 3.05, 'name': 'Aqueous Liquids', 'quantity': 305.0 }], [])) PI_TABLE.add_test('''\tAqueous Liquids\t205.0''', ([{ 'name': 'Aqueous Liquids', 'quantity': 205 }], []))
""" tests.parsers.survey_scanner ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ survey scanner list table tests """ from evepaste import parse_survey_scanner from tests import TableTestGroup SURVEY_SCANNER_TABLE = TableTestGroup(parse_survey_scanner) SURVEY_SCANNER_TABLE.add_test( '''Pyroxeres\t1,919\t5,842 m Pyroxeres\t11,595\t7,180 m Pyroxeres\t5,414\t6,134 m Scordite Veldspar Veldspar\t10\t12 km Veldspar\t26,644\t6,115 m Veldspar\t26,935\t12 km ''', ([{'distance': '5,842 m', 'name': 'Pyroxeres', 'quantity': 1919}, {'distance': '7,180 m', 'name': 'Pyroxeres', 'quantity': 11595}, {'distance': '6,134 m', 'name': 'Pyroxeres', 'quantity': 5414}, {'distance': '12 km', 'name': 'Veldspar', 'quantity': 10}, {'distance': '6,115 m', 'name': 'Veldspar', 'quantity': 26644}, {'distance': '12 km', 'name': 'Veldspar', 'quantity': 26935}], []))
""" tests.parsers.wallet ~~~~~~~~~~~~~~~~~~~~ Loot history table tests """ from evepaste import parse_wallet from tests import TableTestGroup WALLET_TABLE = TableTestGroup(parse_wallet) WALLET_TABLE.add_test("2014.01.04 05:49:31\tMarket Escrow\t-251.00 ISK\t" "325.22 ISK\tMarket escrow authorized by: Me", ([{'amount': '-251.00 ISK', 'balance': '325.22 ISK', 'time': '2014.01.04 05:49:31', 'description': 'Market escrow authorized by: Me', 'transaction_type': 'Market Escrow'}], [])) WALLET_TABLE.add_test( "2014.01.04 16:08\tStorm Command Center\t200,000.00 ISK\t1\t" "-200,000.00 ISK\tISK\tlady scarlette\t" "Otanuomi IV - Moon 4 - Ishukone Corporation Factory", ([{'client': 'lady scarlette', 'credit': '-200,000.00 ISK', 'currency': 'ISK', 'name': 'Storm Command Center', 'price': '200,000.00 ISK', 'quantity': 1, 'time': '2014.01.04 16:08', 'where': 'Otanuomi IV - Moon 4 - Ishukone Corporation Factory'}], []))
""" tests.parsers.dscan ~~~~~~~~~~~~~~~~~~~ D-Scan table tests """ from evepaste import parse_dscan from tests import TableTestGroup DSCAN_TABLE = TableTestGroup(parse_dscan) DSCAN_TABLE.add_test('''+\tNoctis\t3,225 m +\tThrasher\t12 km some dude's Stabber Fleet Issue\tStabber Fleet Issue\t- Wreck\tTayra\t82 km''', ([ {'item_name': '+', 'distance': '3,225 m', 'name': 'Noctis'}, {'item_name': '+', 'distance': '12 km', 'name': 'Thrasher'}, {'item_name': "some dude's Stabber Fleet Issue", 'distance': '-', 'name': 'Stabber Fleet Issue'}, {'item_name': 'Wreck', 'distance': '82 km', 'name': 'Tayra'}], [])) DSCAN_TABLE.add_test(u'test\tNoctis\t3\xc2\xa0225 m', ([ {'item_name': 'test', 'name': 'Noctis', 'distance': '3225 m'}], [])) DSCAN_TABLE.add_test('Otanuomi V - Moon 11\tMoon\t10.4 AU', ([ {'item_name': 'Otanuomi V - Moon 11', 'name': 'Moon', 'distance': '10.4 AU'}], []))
""" tests.parsers.loot_history ~~~~~~~~~~~~~~~~~~~~~~~~~~ Loot history table tests """ from evepaste import parse_loot_history from tests import TableTestGroup LOOT_HISTORY_TABLE = TableTestGroup(parse_loot_history) LOOT_HISTORY_TABLE.add_test('''03:21:19 Some dude has looted 5 x Garde II''', ([{'time': '03:21:19', 'player_name': 'Some dude', 'quantity': 5, 'name': 'Garde II'}], [])) LOOT_HISTORY_TABLE.add_test('''03:21:19 Some dude has looted 5 x Garde II 04:22:20 Some dude has looted 5 x Garde II''', ([{'time': '03:21:19', 'player_name': 'Some dude', 'quantity': 5, 'name': 'Garde II'}, {'time': '04:22:20', 'player_name': 'Some dude', 'quantity': 5, 'name': 'Garde II'}], [])) LOOT_HISTORY_TABLE.add_test('Garde II', ([], ['Garde II']))
""" tests.parsers.wallet ~~~~~~~~~~~~~~~~~~~~ Loot history table tests """ from evepaste import parse_wallet from tests import TableTestGroup WALLET_TABLE = TableTestGroup(parse_wallet) WALLET_TABLE.add_test("2014.01.04 05:49:31\tMarket Escrow\t-251.00 ISK\t" "325.22 ISK\tMarket escrow authorized by: Me", ([{'amount': '-251.00 ISK', 'balance': '325.22 ISK', 'time': '2014.01.04 05:49:31', 'description': 'Market escrow authorized by: Me', 'transaction_type': 'Market Escrow'}], [])) WALLET_TABLE.add_test( "2014.01.04 16:08\tStorm Command Center\t200,000.00 ISK\t1\t" "-200,000.00 ISK\tISK\tlady scarlette\t" "Otanuomi IV - Moon 4 - Ishukone Corporation Factory", ([{'client': 'lady scarlette', 'credit': '-200,000.00 ISK', 'currency': 'ISK', 'name': 'Storm Command Center', 'price': '200,000.00 ISK', 'quantity': 1, 'time': '2014.01.04 16:08', 'where': 'Otanuomi IV - Moon 4 - Ishukone Corporation Factory'}], [])) WALLET_TABLE.add_test(
""" tests.parsers.planetary_interaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ planetary interaction list table tests """ from evepaste import parse_pi from tests import TableTestGroup PI_TABLE = TableTestGroup(parse_pi) PI_TABLE.add_test('''331.0\tAqueous Liquids\tNot routed 331\tAqueous Liquids\tRouted''', ([ {'routed': False, 'name': 'Aqueous Liquids', 'quantity': 3310}, {'routed': True, 'name': 'Aqueous Liquids', 'quantity': 331}], [])) PI_TABLE.add_test('''\tAqueous Liquids\t305.0\t3.05''', ([ {'volume': '3.05', 'name': 'Aqueous Liquids', 'quantity': 3050}], [])) PI_TABLE.add_test('''\tAqueous Liquids\t205.0''', ([ {'name': 'Aqueous Liquids', 'quantity': 2050}], []))
""" tests.parsers.fleet_composition ~~~~~~~~~~~~~~~~~~~ Fleet composition parsing test """ from evepaste import parse_fleet_composition from tests import TableTestGroup FLEET_COMP_TABLE = TableTestGroup(parse_fleet_composition) FLEET_COMP_TABLE.add_test('''Haruka Atsuki\tKakakela (Docked)\tLeopard\tShuttle\tSquad Commander (Boss)\t0 - 0 - 0\tWing 1 / Squad 1''', ([{'system_name': u'Kakakela (Docked)', 'ship_class': u'Shuttle', 'fleet_command_skill': u'0', 'ship_type': u'Leopard', 'fleet_role': u'Squad Commander (Boss)', 'leadership_skill': u'0', 'wing_command_skill': u'0', 'squad': u'Wing 1 / Squad 1', 'character_name': u'Haruka Atsuki'}], []))