File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed
Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,8 @@ def init(self, config_location=None):
8888 path = f'/team/{ self .team_id } ' ,
8989 )
9090
91- self .user_id = response .json ()[ 'creator_id' ]
92- self .team_name = response .json ()[ 'name' ]
91+ self .user_id = response .json (). get ( 'creator_id' , None )
92+ self .team_name = response .json (). get ( 'name' , None )
9393
9494 if not self ._verify :
9595 urllib3 .disable_warnings (
Original file line number Diff line number Diff line change 1- # from pathlib import Path
1+ from pathlib import Path
22
3- # import superannotate as sa
3+ import superannotate as sa
44
5- # def test_basic_auth():
6- # try:
7- # sa.init(Path("tests") / "config__wrong.json")
8- # except sa.SABaseException as e:
9- # assert e.message == 'Couldn\'t authorize {"error":"Not authorized."}'
10- # else:
11- # assert False
12- # sa.init(Path.home() / ".superannotate" / "config.json")
5+
6+ def test_basic_auth ():
7+ try :
8+ sa .init (Path ("tests" ) / "config__wrong.json" )
9+ except sa .SABaseException as e :
10+ assert e .message == 'Couldn\' t authorize {"error":"Not authorized."}'
11+ else :
12+ assert False
13+ sa .init (Path .home () / ".superannotate" / "config.json" )
You can’t perform that action at this time.
0 commit comments