@@ -100,7 +100,7 @@ async def test_get_dir_no_contents(jp_fetch, contents, path, name):
100
100
assert model ['path' ] == path
101
101
assert model ['type' ] == 'directory'
102
102
assert 'content' in model
103
- assert model ['content' ] == None
103
+ assert model ['content' ] is None
104
104
105
105
106
106
async def test_list_nonexistant_dir (jp_fetch , contents ):
@@ -144,7 +144,7 @@ async def test_get_nb_no_contents(jp_fetch, contents, path, name):
144
144
assert model ['path' ] == nbpath
145
145
assert model ['type' ] == 'notebook'
146
146
assert 'content' in model
147
- assert model ['content' ] == None
147
+ assert model ['content' ] is None
148
148
149
149
150
150
async def test_get_nb_invalid (contents_dir , jp_fetch , contents ):
@@ -623,7 +623,7 @@ async def test_checkpoints_follow_file(jp_fetch, contents):
623
623
hcell = new_markdown_cell ('Created by test' )
624
624
nb .cells .append (hcell )
625
625
nbmodel = {'content' : nb , 'type' : 'notebook' }
626
- r = await jp_fetch (
626
+ await jp_fetch (
627
627
'api' , 'contents' , path , name ,
628
628
method = 'PUT' ,
629
629
body = json .dumps (nbmodel )
@@ -653,7 +653,7 @@ async def test_rename_existing(jp_fetch, contents):
653
653
name = 'a.ipynb'
654
654
new_name = 'b.ipynb'
655
655
# Rename the file
656
- r = await jp_fetch (
656
+ await jp_fetch (
657
657
'api' , 'contents' , path , name ,
658
658
method = 'PATCH' ,
659
659
body = json .dumps ({'path' : path + '/' + new_name })
@@ -671,7 +671,7 @@ async def test_save(jp_fetch, contents):
671
671
nb = from_dict (nbmodel )
672
672
nb .cells .append (new_markdown_cell ('Created by test ³' ))
673
673
nbmodel = {'content' : nb , 'type' : 'notebook' }
674
- r = await jp_fetch (
674
+ await jp_fetch (
675
675
'api' , 'contents' , 'foo/a.ipynb' ,
676
676
method = 'PUT' ,
677
677
body = json .dumps (nbmodel )
@@ -711,7 +711,7 @@ async def test_checkpoints(jp_fetch, contents):
711
711
712
712
# Save it.
713
713
nbmodel = {'content' : nb , 'type' : 'notebook' }
714
- resp = await jp_fetch (
714
+ await jp_fetch (
715
715
'api' , 'contents' , path ,
716
716
method = 'PUT' ,
717
717
body = json .dumps (nbmodel )
@@ -790,7 +790,7 @@ async def test_file_checkpoints(jp_fetch, contents):
790
790
}
791
791
792
792
# Save it.
793
- resp = await jp_fetch (
793
+ await jp_fetch (
794
794
'api' , 'contents' , path ,
795
795
method = 'PUT' ,
796
796
body = json .dumps (model )
0 commit comments