Skip to content

Commit 9177577

Browse files
author
Alejandro Casanovas
committed
fixed annotations and test
1 parent 4183de2 commit 9177577

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

O365/connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def get_scopes_for(self, user_provided_scopes: Optional[Union[list, str, tuple]]
197197

198198
return list(scopes)
199199

200-
def prefix_scope(self, scope: Union[tuple, str]) -> str:
200+
def prefix_scope(self, scope: str) -> str:
201201
""" Inserts the protocol scope prefix if required"""
202202
if self.protocol_scope_prefix:
203203
if not scope.startswith(self.protocol_scope_prefix):

tests/test_protocol.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,8 @@ def test_get_scopes_for(self):
6464
def test_prefix_scope(self):
6565
assert(self.proto.prefix_scope('Mail.Read') == 'Mail.Read')
6666

67-
assert(self.proto.prefix_scope(('Mail.Read',)) == 'Mail.Read')
68-
6967
self.proto.protocol_scope_prefix = 'test_prefix_'
70-
71-
assert(self.proto.prefix_scope(('Mail.Read',)) == 'Mail.Read')
72-
68+
7369
assert(self.proto.prefix_scope('test_prefix_Mail.Read') == 'test_prefix_Mail.Read')
7470

7571
assert(self.proto.prefix_scope('Mail.Read') == 'test_prefix_Mail.Read')

0 commit comments

Comments
 (0)