@@ -84,22 +84,19 @@ def test_specific_unwatched_unknown_special_season(self):
8484 @pytest .mark .block_network
8585 def test_specific_unwatched_special_season (self ):
8686 # Pioneer One does not have a special season, so we need to mock it.
87- client_type = namedtuple (' client' , [' jellyfin' ])
87+ client_type = namedtuple (" client" , [" jellyfin" ])
8888 client = client_type (Mock ())
89- show_dict = {
90- "Id" : 4 ,
91- "Name" : "Foo Bar"
92- }
89+ show_dict = {"Id" : 4 , "Name" : "Foo Bar" }
9390 special_dict = {
9491 "IndexNumber" : 0 ,
9592 "ChildCount" : 1 ,
96- "UserData" : {"UnplayedItemCount" : 0 }
97- }
93+ "UserData" : {"UnplayedItemCount" : 0 },
94+ }
9895 client .jellyfin .get_seasons .return_value = [Item (special_dict )]
9996 with patch (
10097 "jellyash.unwatched.search_single_show" ,
101- return_value = Item (show_dict )
102- ):
98+ return_value = Item (show_dict ),
99+ ):
103100 specific_unwatched (client , "Foo Bar" , 0 )
104101 captured = self .capsys .readouterr ()
105102 name = "Foo Bar, Specials"
@@ -118,17 +115,17 @@ def test_specific_unwatched_not_found(self):
118115 @pytest .mark .block_network
119116 def test_unwatched_season_without_show (self ):
120117 with patch ("jellyash.unwatched.authed_client" ):
121- with patch ("argparse.ArgumentParser.parse_args" ,
122- return_value = argparse .Namespace (show = [], season = 3 )
118+ with patch (
119+ "argparse.ArgumentParser.parse_args" ,
120+ return_value = argparse .Namespace (show = [], season = 3 ),
123121 ):
124122 # Sigh, parser.error will always exit.
125123 with self .assertRaises (SystemExit ):
126124 unwatched ()
127125 captured = self .capsys .readouterr ()
128126 self .assertEqual (captured .out , "" )
129127 self .assertIn (
130- "Need to specify a show when specifiying a season" ,
131- captured .err
128+ "Need to specify a show when specifiying a season" , captured .err
132129 )
133130
134131
@@ -139,7 +136,7 @@ def test_unwatched_all(self):
139136 with patch ("jellyash.unwatched.all_unwatched" ) as all_mock :
140137 with patch (
141138 "argparse.ArgumentParser.parse_args" ,
142- return_value = argparse .Namespace (show = [], season = None )
139+ return_value = argparse .Namespace (show = [], season = None ),
143140 ):
144141 unwatched ()
145142 all_mock .assert_called_once_with (client_mock ())
@@ -149,10 +146,11 @@ def test_unwatched_specific(self):
149146 namespace = argparse .Namespace (show = ["Foo" , "Bar" ], season = None )
150147 with patch ("jellyash.unwatched.authed_client" ) as client_mock :
151148 with patch (
152- "jellyash.unwatched.specific_unwatched" ) as specific_mock :
149+ "jellyash.unwatched.specific_unwatched"
150+ ) as specific_mock :
153151 with patch (
154152 "argparse.ArgumentParser.parse_args" ,
155- return_value = namespace
153+ return_value = namespace ,
156154 ):
157155 unwatched ()
158156 specific_mock .assert_called_once_with (
0 commit comments