diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_shorts.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_shorts.py b/tests/test_shorts.py index c5b7301..c413a8b 100644 --- a/tests/test_shorts.py +++ b/tests/test_shorts.py @@ -27,7 +27,7 @@ class TestChannelCtokenV5: def _decode_outer(self, ctoken): """Decode the outer protobuf layer of a ctoken.""" - raw = base64.urlsafe_b64decode(ctoken + '==') + raw = base64.urlsafe_b64decode(f'{ctoken}==') return {fn: val for _, fn, val in proto.read_protobuf(raw)} def test_shorts_token_generates_without_error(self): @@ -68,8 +68,8 @@ class TestChannelCtokenV5: assert t_with_shorts != t_without_shorts # Decode and verify the filter is present - raw_with_shorts = base64.urlsafe_b64decode(t_with_shorts + '==') - raw_without_shorts = base64.urlsafe_b64decode(t_without_shorts + '==') + raw_with_shorts = base64.urlsafe_b64decode(f'{t_with_shorts}==') + raw_without_shorts = base64.urlsafe_b64decode(f'{t_without_shorts}==') # Parse the outer protobuf structure import youtube.proto as proto @@ -95,8 +95,8 @@ class TestChannelCtokenV5: decoded_without = urllib.parse.unquote(encoded_inner_without.decode('ascii')) # Decode the base64 data - decoded_with_bytes = base64.urlsafe_b64decode(decoded_with + '==') - decoded_without_bytes = base64.urlsafe_b64decode(decoded_without + '==') + decoded_with_bytes = base64.urlsafe_b64decode(f'{decoded_with}==') + decoded_without_bytes = base64.urlsafe_b64decode(f'{decoded_without}==') # Parse the decoded protobuf data fields_with = list(proto.read_protobuf(decoded_with_bytes)) |
