@@ -121,7 +121,12 @@ def test_describe_unknown_verb_steers(self):
121121
122122 def test_read_only_verbs_advertise_read_only (self ):
123123 read_only = (
124- "mail-list" , "mail-get" , "rule-list" , "rule-verify" , "category-list" , "searchfolder-list" ,
124+ "mail-list" ,
125+ "mail-get" ,
126+ "rule-list" ,
127+ "rule-verify" ,
128+ "category-list" ,
129+ "searchfolder-list" ,
125130 )
126131 for name in read_only :
127132 tool = next (t for t in client .TOOLS if t ["name" ] == name )
@@ -512,8 +517,12 @@ def responder(method, url, **kw):
512517 client ._http = rec
513518 self ._capture (
514519 client .cmd_rule_create ,
515- _Args (name = "Flag" , header_contains = ["List-Unsubscribe" ], move_to_folder = None ,
516- assign_category = ["Needs attention" ]),
520+ _Args (
521+ name = "Flag" ,
522+ header_contains = ["List-Unsubscribe" ],
523+ move_to_folder = None ,
524+ assign_category = ["Needs attention" ],
525+ ),
517526 )
518527 rule_post = next (c for c in rec .calls if c [0 ] == "POST" and c [1 ].endswith ("/messageRules" ))
519528 actions = rule_post [3 ]["actions" ]
@@ -540,8 +549,12 @@ def responder(method, url, **kw):
540549 client ._http = rec
541550 self ._capture (
542551 client .cmd_rule_create ,
543- _Args (name = "Both" , header_contains = ["List-Unsubscribe" ], move_to_folder = "News" ,
544- assign_category = ["Needs attention" ]),
552+ _Args (
553+ name = "Both" ,
554+ header_contains = ["List-Unsubscribe" ],
555+ move_to_folder = "News" ,
556+ assign_category = ["Needs attention" ],
557+ ),
545558 )
546559 rule_post = next (c for c in rec .calls if c [0 ] == "POST" and c [1 ].endswith ("/messageRules" ))
547560 actions = rule_post [3 ]["actions" ]
@@ -598,8 +611,13 @@ def test_create_refuses_without_mail_readwrite(self):
598611 self ._sign_in (scope )
599612 with self .assertRaises (client .SteerError ):
600613 client .cmd_searchfolder_create (
601- _Args (name = "N" , category = "Needs attention" , filter_query = None ,
602- source_folders = None , include_nested = True )
614+ _Args (
615+ name = "N" ,
616+ category = "Needs attention" ,
617+ filter_query = None ,
618+ source_folders = None ,
619+ include_nested = True ,
620+ )
603621 )
604622
605623 def test_create_refuses_without_filter (self ):
@@ -616,8 +634,13 @@ def test_create_shapes_body_with_odata_type(self):
616634 client ._http = rec
617635 self ._capture (
618636 client .cmd_searchfolder_create ,
619- _Args (name = "Needs attention" , category = "Needs attention" , filter_query = None ,
620- source_folders = ["inbox" ], include_nested = True ),
637+ _Args (
638+ name = "Needs attention" ,
639+ category = "Needs attention" ,
640+ filter_query = None ,
641+ source_folders = ["inbox" ],
642+ include_nested = True ,
643+ ),
621644 )
622645 post = next (c for c in rec .calls if c [0 ] == "POST" )
623646 self .assertTrue (post [1 ].endswith ("/me/mailFolders/searchfolders/childFolders" ))
@@ -633,8 +656,13 @@ def test_create_explicit_filter_overrides_category(self):
633656 client ._http = rec
634657 self ._capture (
635658 client .cmd_searchfolder_create ,
636- _Args (name = "Big" , category = "Ignored" , filter_query = "hasAttachments eq true" ,
637- source_folders = None , include_nested = False ),
659+ _Args (
660+ name = "Big" ,
661+ category = "Ignored" ,
662+ filter_query = "hasAttachments eq true" ,
663+ source_folders = None ,
664+ include_nested = False ,
665+ ),
638666 )
639667 body = next (c for c in rec .calls if c [0 ] == "POST" )[3 ]
640668 self .assertEqual (body ["filterQuery" ], "hasAttachments eq true" )
@@ -643,9 +671,17 @@ def test_create_explicit_filter_overrides_category(self):
643671
644672 def test_list_read_scope_only (self ):
645673 self ._sign_in ("Mail.Read MailboxSettings.Read offline_access" )
646- payload = {"value" : [{"id" : "sf1" , "displayName" : "Needs attention" ,
647- "filterQuery" : "categories/any(c:c eq 'Needs attention')" ,
648- "includeNestedFolders" : True , "sourceFolderIds" : ["inbox" ]}]}
674+ payload = {
675+ "value" : [
676+ {
677+ "id" : "sf1" ,
678+ "displayName" : "Needs attention" ,
679+ "filterQuery" : "categories/any(c:c eq 'Needs attention')" ,
680+ "includeNestedFolders" : True ,
681+ "sourceFolderIds" : ["inbox" ],
682+ }
683+ ]
684+ }
649685 rec = _HttpRecorder (lambda method , url , ** kw : payload )
650686 client ._http = rec
651687 out = self ._capture (client .cmd_searchfolder_list , _Args (format = "concise" ))
0 commit comments