""" 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.killmail ~~~~~~~~~~~~~~~~~~~~~~ Killmail table tests """ from evepaste import parse_killmail, Unparsable from tests import TableTestGroup KILLMAIL_TABLE = TableTestGroup(parse_killmail) 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
""" tests.parsers.eft ~~~~~~~~~~~~~~~~~ EFT table tests """ from evepaste import parse_eft from evepaste.exceptions import Unparsable 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},
""" 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.view_contents ~~~~~~~~~~~~~~~~~~~~~~~~~~~ View Contents list table tests """ from evepaste import parse_view_contents from tests import TableTestGroup VIEW_CONTENTS_TABLE = TableTestGroup(parse_view_contents) 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',
""" 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' }], []))
""" tests.parsers.killmail ~~~~~~~~~~~~~~~~~~~~~~ Killmail table tests """ from evepaste import parse_killmail, Unparsable from tests import TableTestGroup KILLMAIL_TABLE = TableTestGroup(parse_killmail) 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
""" 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.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'
""" 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.fitting ~~~~~~~~~~~~~~~~~~~~~ Fitting listing table tests """ from evepaste import parse_fitting from tests import TableTestGroup FITTING_TABLE = TableTestGroup(parse_fitting) 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
""" 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,
""" tests.parsers.required_materials ~~~~~~~~~~~~~~~~~~~~~~~~ Blueprint Info required materials table tests """ from evepaste import parse_listing from tests import TableTestGroup REQUIRED_MATERIALS_TABLE = TableTestGroup(parse_required_materials) REQUIRED_MATERIALS_TABLE.addTest('9'584'701 x Tritanium', ([{'name': 'Tritanium', 'quantity': 9584701}], [])) REQUIRED_MATERIALS_TABLE.addTest( '''9'584'701 x Tritanium 2'036'800 x Pyerite 546'300 x Mexallon 149'580 x Isogen 32'410 x Nocxium 7'230 x Zydrine 3'010 x Megacyte''', ([ {'name': 'Tritanium', 'quantity': 9584701}, {'name': 'Pyerite', 'quantity': 2036800}, {'name': 'Mexallon', 'quantity': 546300}, {'name': 'Isogen', 'quantity': 149580}, {'name': 'Nocxium', 'quantity': 32410}, {'name': 'Zydrine', 'quantity': 7230}, {'name': 'Megacyte', 'quantity': 3010}, ], []))
""" 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',
""" tests.parsers.eft ~~~~~~~~~~~~~~~~~ EFT table tests """ from evepaste import parse_eft from evepaste.exceptions import Unparsable 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',
""" tests.parsers.fitting ~~~~~~~~~~~~~~~~~~~~~ Fitting listing table tests """ from evepaste import parse_fitting from tests import TableTestGroup FITTING_TABLE = TableTestGroup(parse_fitting) 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
""" 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}], []))
""" 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 }], []))
""" 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)
""" 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',
""" tests.parsers.view_contents ~~~~~~~~~~~~~~~~~~~~~~~~~~~ View Contents list table tests """ from evepaste import parse_view_contents from tests import TableTestGroup VIEW_CONTENTS_TABLE = TableTestGroup(parse_view_contents) 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',
""" 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'}], []))