diff --git a/src/log_scanner.py b/src/log_scanner.py index fcb50a0..4c6b779 100644 --- a/src/log_scanner.py +++ b/src/log_scanner.py @@ -278,14 +278,12 @@ def draft_data_search(self, use_ocr, save_screenshot): # Use OCR to retrieve P1P1 if use_ocr: self.__get_ocr_pack(save_screenshot) - self.__draft_pack_search_traditional_p1p1() + self.__draft_pack_search_traditional_p1p1() self.__draft_pack_search_traditional() self.__draft_picked_search_traditional() elif ((self.draft_type == constants.LIMITED_TYPE_SEALED) or (self.draft_type == constants.LIMITED_TYPE_SEALED_TRADITIONAL)): update = self.__sealed_pack_search() - if not update: - update = self.__sealed_pack_search_v2() if not update: if ((previous_pack != self.current_pack) or (previous_pick != self.current_pick) or @@ -935,50 +933,6 @@ def __draft_pack_search_traditional(self): return pack_cards def __sealed_pack_search(self): - '''Parse sealed string that contains all of the card data''' - offset = self.pack_offset - draft_data = object() - draft_string = "EventGrantCardPool" - update = False - # Identify and print out the log lines that contain the draft packs - try: - with open(self.arena_file, 'r', encoding="utf-8", errors="replace") as log: - log.seek(offset) - - while True: - line = log.readline() - if not line: - break - offset = log.tell() - - string_offset = line.find(draft_string) - - if string_offset != -1: - update = True - self.pack_offset = offset - start_offset = line.find("{\"CurrentModule\"") - self.draft_log.info(line) - # Identify the pack - draft_data = json.loads(line[start_offset:]) - changes = draft_data["Changes"] - try: - card_pool = [] - for change in changes: - if change["Source"] == "EventGrantCardPool": - card_list_data = change["GrantedCards"] - for card_data in card_list_data: - card = str(card_data["GrpId"]) - card_pool.append(card) - self.__sealed_update(card_pool) - except Exception as error: - self.draft_log.info( - "__sealed_pack_search Error: %s", error) - - except Exception as error: - self.draft_log.info("__sealed_pack_search Error: %s", error) - return update - - def __sealed_pack_search_v2(self): '''Parse sealed string that contains all of the card data''' offset = self.pack_offset draft_string = f'\"InternalEventName\":\"{self.event_string}\"' @@ -999,21 +953,28 @@ def __sealed_pack_search_v2(self): try: self.pack_offset = offset self.draft_log.info(line) - start_offset = line.find("{\"Courses\"") - course_data = json.loads(line[start_offset:]) - for course in course_data["Courses"]: - if course["InternalEventName"] == self.event_string: - card_pool = [str(x) for x in course["CardPool"]] + if "Courses" in line: + start_offset = line.find("{\"Courses\"") + course_data = json.loads(line[start_offset:]) + for course in course_data["Courses"]: + if course["InternalEventName"] == self.event_string: + card_pool = [str(x) for x in course["CardPool"]] + self.__sealed_update(card_pool) + update = True + elif "Course" in line: + start_offset = line.find("{\"Course\"") + course_data = process_json(line[start_offset:]) + if course_data["Course"]["InternalEventName"] == self.event_string: + card_pool = [str(x) for x in course_data["Course"]["CardPool"]] self.__sealed_update(card_pool) - - update = True + update = True except Exception as error: self.draft_log.info( - "__sealed_pack_search_v2 Error: %s", error) + "__sealed_pack_search Error: %s", error) except Exception as error: - self.draft_log.info("__sealed_pack_search_v2 Error: %s", error) + self.draft_log.info("__sealed_pack_search Error: %s", error) return update def __sealed_update(self, cards): diff --git a/tests/test_log_scanner.py b/tests/test_log_scanner.py index 4eb97f4..12f2cfc 100644 --- a/tests/test_log_scanner.py +++ b/tests/test_log_scanner.py @@ -33,6 +33,7 @@ OTJ_P1P2_ENTRY_SKIP = r'[UnityCrossThreadLogger]==> LogBusinessEvents {"id":"972efef7-cd60-4254-ae18-634210287c95","request":"{\"PlayerId\":null,\"ClientPlatform\":null,\"DraftId\":\"87b408d1-43e0-4fb5-8c74-a1257fde087c\",\"EventId\":\"PremierDraft_OTJ_20240416\",\"SeatNumber\":1,\"PackNumber\":1,\"PickNumber\":2,\"PickGrpId\":90701,\"CardsInPack\":[90702,90417,90607,90524,90481,90588,90440,90418,90353,90494,90360,90609,90548],\"AutoPick\":false,\"TimeRemainingOnPick\":30.8176479,\"EventType\":24,\"EventTime\":\"2024-05-08T00:57:07.6027017Z\"}"}' TEST_SETS = SetDictionary(data={ + "DSK" : SetInfo(seventeenlands=["DSK"]), "MH3" : SetInfo(seventeenlands=["MH3"]), "OTJ" : SetInfo(seventeenlands=["OTJ"]), "MKM" : SetInfo(seventeenlands=["MKM"]), @@ -470,6 +471,36 @@ class EventResults: ) ] +# Sealedlog entries collected from Player.log after 2024-9-24 Arena update +DSK_SEALED_ENTRIES_2024_9_24 = [ + ("Event Start", + EventResults(new_event=True, + data_update=False, + current_set="DSK", + current_event="Sealed", + current_pack=0, + current_pick=0, + picks=[], + pack=[], + card_pool=[], + missing=[]), + r'[UnityCrossThreadLogger]==> Event_Join {"id":"54d60b67-59a9-4188-bc42-ab78fed44fad","request":"{\"EventName\":\"Sealed_DSK_20240924\",\"EntryCurrencyType\":\"Gem\",\"EntryCurrencyPaid\":2000,\"CustomTokenId\":null}"}' + ), + ("Card Pool", + EventResults(new_event=False, + data_update=True, + current_set="DSK", + current_event="Sealed", + current_pack=0, + current_pick=0, + picks=[], + pack=[], + card_pool=["92248","92368","92257","92188","92143","92242","92055","92154","92149","92238","92162","92261","92350","92338","92307","92379","92154","92073","92167","92203","92143","92291","92219","92235","92127","92311","92208","92230","92201","92364","92073","92268","92111","92181","92236","92146","92267","92116","92185","92304","92066","92313","92076","92365","92156","92146","92343","92237","92369","92274","92055","92067","92308","92234","92265","92360","92212","92380","92172","92279","92148","92073","92154","92179","92224","92141","92316","92305","92342","92092","92266","92377","92279","92240","92148","92114","92172","92070","92290","92229","92090","92182","92113","92119"], + missing=[]), + r'{"Course":{"CourseId":"d276ee0e-a180-41f9-b41a-8249c1db4bdf","InternalEventName":"Sealed_DSK_20240924","CurrentModule":"DeckSelect","ModulePayload":"","CourseDeckSummary":{"Attributes":[],"FormatLegalities":{},"PreferredCosmetics":{},"DeckValidationSummaries":[],"UnownedCards":{}},"CardPool":[92248,92368,92257,92188,92143,92242,92055,92154,92149,92238,92162,92261,92350,92338,92307,92379,92154,92073,92167,92203,92143,92291,92219,92235,92127,92311,92208,92230,92201,92364,92073,92268,92111,92181,92236,92146,92267,92116,92185,92304,92066,92313,92076,92365,92156,92146,92343,92237,92369,92274,92055,92067,92308,92234,92265,92360,92212,92380,92172,92279,92148,92073,92154,92179,92224,92141,92316,92305,92342,92092,92266,92377,92279,92240,92148,92114,92172,92070,92290,92229,92090,92182,92113,92119],"CardStyles":[]},"InventoryInfo":{"SeqId":9,"Changes":[{"Source":"EventPayEntry","SourceId":"d276ee0e-a180-41f9-b41a-8249c1db4bdf","InventoryGems":-2000,"InventoryCustomTokens":{},"ArtStyles":[],"Avatars":[],"Sleeves":[],"Pets":[],"Emotes":[],"Titles":[],"Decks":[],"DecksV2":[],"DeckCards":{},"Boosters":[],"GrantedCards":[],"Vouchers":{},"NewLetters":[],"PrizeWallsUnlocked":[]},{"Source":"EventGrantCardPool","SourceId":"Sealed_DSK_20240924","InventoryCustomTokens":{},"ArtStyles":[],"Avatars":[],"Sleeves":[],"Pets":[],"Emotes":[],"Titles":[],"Decks":[],"DecksV2":[],"DeckCards":{},"Boosters":[],"GrantedCards":[{"GrpId":92248,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92368,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92257,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92188,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92143,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92143,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92242,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92055,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92055,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92154,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92154,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92154,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92149,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92238,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92162,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92261,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92350,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92338,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92307,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92073,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92073,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92073,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92167,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92203,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92291,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92219,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92235,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92127,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92311,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92208,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92230,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92201,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92364,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92268,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92111,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92181,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92236,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92146,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92146,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92267,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92116,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92185,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92304,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92066,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92313,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92076,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92365,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92156,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92343,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92237,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92369,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92274,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92067,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92308,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92234,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92265,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92360,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92212,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92172,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92172,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92279,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92279,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92148,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92148,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92179,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92224,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92141,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92316,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92305,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92342,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92092,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92266,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92240,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92114,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92070,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92290,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92229,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92090,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92182,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92113,"CardAdded":true,"SetCode":"DSK"},{"GrpId":92119,"CardAdded":true,"SetCode":"DSK"}],"Vouchers":{},"NewLetters":[],"PrizeWallsUnlocked":[]}],"Gems":350,"Gold":4500,"TotalVaultProgress":869,"wcTrackPosition":6,"WildCardCommons":68,"WildCardUnCommons":87,"WildCardRares":28,"WildCardMythics":12,"CustomTokens":{"BattlePass_AFR_Orb":1,"BattlePass_HBG_Orb":1,"BonusPackProgress":1,"BattlePass_MKM_Orb":1,"DraftToken":1},"Boosters":[{"CollationId":100026,"SetCode":"VOW","Count":10},{"CollationId":100024,"SetCode":"AFR","Count":7},{"CollationId":100020,"SetCode":"ZNR","Count":2},{"CollationId":100022,"SetCode":"KHM","Count":2},{"CollationId":100023,"SetCode":"STX","Count":3},{"CollationId":100025,"SetCode":"MID","Count":4},{"CollationId":100027,"SetCode":"NEO","Count":41},{"CollationId":100028,"SetCode":"SNC","Count":3},{"CollationId":400028,"SetCode":"Y22SNC","Count":1},{"CollationId":100029,"SetCode":"HBG","Count":8},{"CollationId":100030,"SetCode":"DMU","Count":2},{"CollationId":100031,"SetCode":"BRO","Count":1},{"CollationId":100032,"SetCode":"ONE","Count":3},{"CollationId":100033,"SetCode":"SIR","Count":3},{"CollationId":100037,"SetCode":"MOM","Count":3},{"CollationId":100039,"SetCode":"LTR","Count":3},{"CollationId":100040,"SetCode":"WOE","Count":3},{"CollationId":400031,"SetCode":"Y23BRO","Count":6},{"CollationId":400032,"SetCode":"Y23ONE","Count":3},{"CollationId":100038,"SetCode":"MAT","Count":3},{"CollationId":400040,"SetCode":"Y24WOE","Count":3},{"CollationId":400041,"SetCode":"Y24LCI","Count":3},{"CollationId":100042,"SetCode":"KTK","Count":3},{"CollationId":100041,"SetCode":"LCI","Count":4},{"CollationId":100043,"SetCode":"MKM","Count":6},{"CollationId":100044,"SetCode":"OTJ","Count":4},{"CollationId":400043,"SetCode":"Y24MKM","Count":3},{"CollationId":400044,"SetCode":"Y24OTJ","Count":3},{"CollationId":100046,"SetCode":"BLB","Count":3},{"CollationId":400046,"SetCode":"Y25BLB","Count":3},{"CollationId":100045,"SetCode":"MH3","Count":3},{"CollationId":100047,"SetCode":"DSK","Count":3}],"Vouchers":{},"PrizeWallsUnlocked":[],"Cosmetics":{"ArtStyles":[{"Type":"ArtStyle","Id":"404952.DA","ArtId":404952,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"409037.DA","ArtId":409037,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"127296.DA","ArtId":127296,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"404505.DA","ArtId":404505,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"402637.DA","ArtId":402637,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"407656.DA","ArtId":407656,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418892.DA","ArtId":418892,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418903.DA","ArtId":418903,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"Event","Type":"ArtStyle","Id":"420249.JP","ArtId":420249,"Variant":"JP","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"416627.SH","ArtId":416627,"Variant":"SH","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417880.JP","ArtId":417880,"Variant":"JP","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"406523.SG","ArtId":406523,"Variant":"SG","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"406664.SG","ArtId":406664,"Variant":"SG","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"409514.SG","ArtId":409514,"Variant":"SG","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"406559.SG","ArtId":406559,"Variant":"SG","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"406626.SG","ArtId":406626,"Variant":"SG","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"402959.DA","ArtId":402959,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"400332.DA","ArtId":400332,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"404135.DA","ArtId":404135,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"404488.DA","ArtId":404488,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"CodeRedemption","Type":"ArtStyle","Id":"402057.DA","ArtId":402057,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418809.DA","ArtId":418809,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418895.DA","ArtId":418895,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418859.DA","ArtId":418859,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418963.DA","ArtId":418963,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418925.DA","ArtId":418925,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418777.DA","ArtId":418777,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418962.DA","ArtId":418962,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418781.DA","ArtId":418781,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418812.DA","ArtId":418812,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"416383.DA","ArtId":416383,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"416356.DA","ArtId":416356,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418912.DA","ArtId":418912,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418917.DA","ArtId":418917,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418785.DA","ArtId":418785,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418790.DA","ArtId":418790,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418988.DA","ArtId":418988,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418798.DA","ArtId":418798,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419549.DA","ArtId":419549,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419568.DA","ArtId":419568,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"418867.DA","ArtId":418867,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"419407.DA","ArtId":419407,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419576.DA","ArtId":419576,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"422879.DA","ArtId":422879,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419437.DA","ArtId":419437,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419501.DA","ArtId":419501,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419546.DA","ArtId":419546,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419693.DA","ArtId":419693,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"415977.DA","ArtId":415977,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419600.DA","ArtId":419600,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419682.DA","ArtId":419682,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419495.DA","ArtId":419495,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419551.DA","ArtId":419551,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419683.DA","ArtId":419683,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419694.DA","ArtId":419694,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419488.DA","ArtId":419488,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419685.DA","ArtId":419685,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419452.DA","ArtId":419452,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419643.DA","ArtId":419643,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419687.DA","ArtId":419687,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419567.DA","ArtId":419567,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419720.DA","ArtId":419720,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"415990.DA","ArtId":415990,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419665.DA","ArtId":419665,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419664.DA","ArtId":419664,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419722.DA","ArtId":419722,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419672.DA","ArtId":419672,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419676.DA","ArtId":419676,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419601.DA","ArtId":419601,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419620.DA","ArtId":419620,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419617.DA","ArtId":419617,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419721.DA","ArtId":419721,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"424152.DA","ArtId":424152,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419628.DA","ArtId":419628,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419492.DA","ArtId":419492,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419514.DA","ArtId":419514,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419515.DA","ArtId":419515,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419436.DA","ArtId":419436,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419719.DA","ArtId":419719,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"Event","Type":"ArtStyle","Id":"417888.JP","ArtId":417888,"Variant":"JP","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419536.DA","ArtId":419536,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419528.DA","ArtId":419528,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419527.DA","ArtId":419527,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419593.DA","ArtId":419593,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419446.DA","ArtId":419446,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"415986.DA","ArtId":415986,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419468.DA","ArtId":419468,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419602.DA","ArtId":419602,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419466.DA","ArtId":419466,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419690.DA","ArtId":419690,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419692.DA","ArtId":419692,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419718.DA","ArtId":419718,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419651.DA","ArtId":419651,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419473.DA","ArtId":419473,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"419467.DA","ArtId":419467,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"419630.DA","ArtId":419630,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419688.DA","ArtId":419688,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"419476.DA","ArtId":419476,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421125.DA","ArtId":421125,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417889.JP","ArtId":417889,"Variant":"JP","ExplicitGrpIds":[]},{"AcquisitionFlags":"Event","Type":"ArtStyle","Id":"417868.JP","ArtId":417868,"Variant":"JP","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417340.DA","ArtId":417340,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421130.DA","ArtId":421130,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"419511.DA","ArtId":419511,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421133.DA","ArtId":421133,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417319.DA","ArtId":417319,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"421180.DA","ArtId":421180,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"421284.DA","ArtId":421284,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"421132.DA","ArtId":421132,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"421237.DA","ArtId":421237,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421114.DA","ArtId":421114,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421162.DA","ArtId":421162,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417065.DA","ArtId":417065,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421259.DA","ArtId":421259,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417343.DA","ArtId":417343,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421343.DA","ArtId":421343,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417314.DA","ArtId":417314,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417066.DA","ArtId":417066,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421159.DA","ArtId":421159,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417063.DA","ArtId":417063,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421346.DA","ArtId":421346,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417332.DA","ArtId":417332,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421297.DA","ArtId":421297,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417361.DA","ArtId":417361,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421121.DA","ArtId":421121,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421170.DA","ArtId":421170,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421342.DA","ArtId":421342,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421212.DA","ArtId":421212,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421254.DA","ArtId":421254,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421150.DA","ArtId":421150,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421172.DA","ArtId":421172,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421184.DA","ArtId":421184,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421185.DA","ArtId":421185,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421198.DA","ArtId":421198,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421193.DA","ArtId":421193,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421205.DA","ArtId":421205,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421227.DA","ArtId":421227,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421229.DA","ArtId":421229,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"417351.DA","ArtId":417351,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421242.DA","ArtId":421242,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421263.DA","ArtId":421263,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421270.DA","ArtId":421270,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421273.DA","ArtId":421273,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421282.DA","ArtId":421282,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421344.DA","ArtId":421344,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421283.DA","ArtId":421283,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"421303.DA","ArtId":421303,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"422142.DA","ArtId":422142,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"422322.DA","ArtId":422322,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"417325.DA","ArtId":417325,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"421142.DA","ArtId":421142,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"422152.DA","ArtId":422152,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"422167.DA","ArtId":422167,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"422148.DA","ArtId":422148,"Variant":"DA","ExplicitGrpIds":[]},{"AcquisitionFlags":"SeasonReward","Type":"ArtStyle","Id":"422213.DA","ArtId":422213,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"443063.DA","ArtId":443063,"Variant":"DA","ExplicitGrpIds":[]},{"Type":"ArtStyle","Id":"418126.SCHEMATIC","ArtId":418126,"Variant":"SCHEMATIC","ExplicitGrpIds":[]}],"Avatars":[{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_ChandraNalaar","Type":"Avatar"},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_AjaniGoldmane","Type":"Avatar"},{"Id":"Avatar_Basic_GideonJura","Type":"Avatar"},{"Id":"Avatar_Basic_Teferi","Type":"Avatar"},{"Id":"Avatar_Basic_SarkhanVol","Type":"Avatar"},{"Id":"Avatar_Basic_Tezzeret","Type":"Avatar"},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_VivienReid","Type":"Avatar"},{"Id":"Avatar_Basic_NissaRevane","Type":"Avatar"},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_LilianaVess","Type":"Avatar"},{"Id":"Avatar_Basic_Karn","Type":"Avatar"},{"Id":"Avatar_Basic_JayaBallard","Type":"Avatar"},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_JaceBeleren","Type":"Avatar"},{"Id":"Avatar_Basic_Ellywick_AFR","Type":"Avatar"},{"Id":"Avatar_Basic_Wrenn_MID","Type":"Avatar"},{"AcquisitionFlags":"CodeRedemption","Id":"Avatar_Basic_Sorin_VOW","Type":"Avatar"},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_Elspeth_MOM","Type":"Avatar"},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_Ashiok_WAR","Type":"Avatar"},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Avatar_Basic_Kaito_NEO","Type":"Avatar"}],"Pets":[{"Type":"Pet","Id":"AFR_Dragon.Skin1","Name":"AFR_Dragon","Variant":"Skin1"},{"Type":"Pet","Id":"AFR_Dragon.Skin2","Name":"AFR_Dragon","Variant":"Skin2"},{"Type":"Pet","Id":"MID_Geist.Skin1","Name":"MID_Geist","Variant":"Skin1"},{"Type":"Pet","Id":"MID_Geist.Skin2","Name":"MID_Geist","Variant":"Skin2"},{"Type":"Pet","Id":"MID_Geist.Skin3","Name":"MID_Geist","Variant":"Skin3"},{"Type":"Pet","Id":"VOW_Bat.Level1","Name":"VOW_Bat","Variant":"Level1"},{"Type":"Pet","Id":"VOW_Bat.Level2","Name":"VOW_Bat","Variant":"Level2"},{"Type":"Pet","Id":"VOW_Bat.Level3","Name":"VOW_Bat","Variant":"Level3"}],"Sleeves":[{"AcquisitionFlags":"CodeRedemption","Id":"CardBack_Basic_Thunderstorm_Bitterblossom","Type":"Sleeve"},{"AcquisitionFlags":"CodeRedemption","Id":"CardBack_STX_418002","Type":"Sleeve"},{"AcquisitionFlags":"CodeRedemption","Id":"CardBack_STX_418001","Type":"Sleeve"},{"AcquisitionFlags":"CodeRedemption","Id":"CardBack_STX_418003","Type":"Sleeve"},{"AcquisitionFlags":"CodeRedemption","Id":"CardBack_STX_418004","Type":"Sleeve"},{"AcquisitionFlags":"CodeRedemption","Id":"CardBack_STX_418005","Type":"Sleeve"},{"Id":"CardBack_AFR_419749","Type":"Sleeve"},{"Id":"CardBack_AFR_419144","Type":"Sleeve"},{"Id":"CardBack_AFR_419111","Type":"Sleeve"},{"Id":"CardBack_MID_424253","Type":"Sleeve"},{"Id":"CardBack_MID_423524","Type":"Sleeve"},{"Id":"CardBack_ZNR_402686","Type":"Sleeve"},{"Id":"CardBack_MID_422493","Type":"Sleeve"},{"Id":"CardBack_VOW_424637","Type":"Sleeve"},{"Id":"CardBack_VOW_422028","Type":"Sleeve"},{"Id":"CardBack_VOW_422180","Type":"Sleeve"},{"Id":"CardBack_VOW_421278","Type":"Sleeve"},{"Id":"CardBack_VOW_421349","Type":"Sleeve"},{"AcquisitionFlags":"Event, CodeRedemption","Id":"CardBack_DvC_409074","Type":"Sleeve"},{"Id":"CardBack_DG_MemorialSleeve","Type":"Sleeve"}],"Emotes":[{"AcquisitionFlags":"DefaultLoginGrant","Id":"Phrase_Basic_Hello","Type":"Emote","Category":"Greeting","Treatment":""},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Phrase_Basic_Nice_Thanks","Type":"Emote","FlipType":"Reply","Category":"Kudos","Treatment":""},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Phrase_Basic_Thinking_YourGo","Type":"Emote","FlipType":"Priority","Category":"Priority","Treatment":""},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Phrase_Basic_Oops_Sorry","Type":"Emote","FlipType":"Reply","Category":"Accident","Treatment":""},{"AcquisitionFlags":"DefaultLoginGrant","Id":"Phrase_Basic_GoodGame","Type":"Emote","Category":"GoodGame","Treatment":""}],"Titles":[]}}}' + ) +] + ARENA_OPEN_TEST_ENTRIES = [ ("Unknown Event Start 1", EventResults(new_event=False, @@ -681,6 +712,16 @@ def test_arena_open(function_scanner, entry_label, expected, entry_string): # TODO - Traditional Sealed # TODO - Sealed +@pytest.mark.parametrize("entry_label, expected, entry_string", DSK_SEALED_ENTRIES_2024_9_24) +def test_dsk_sealed(session_scanner, entry_label, expected, entry_string): + """ + Verify that the sealed event entries can be processed + """ + with ( + patch("src.log_scanner.OCR.get_pack") as mock_ocr, + patch("src.log_scanner.capture_screen_base64str") + ): + event_test_cases(session_scanner, "New DSK Sealed", entry_label, expected, entry_string, mock_ocr) @patch("src.log_scanner.OCR.get_pack") @patch("src.log_scanner.capture_screen_base64str")