File: tests.py

package info (click to toggle)
python-gpsoauth 0.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 116 kB
  • sloc: python: 161; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from gpsoauth.google import signature
from gpsoauth.util import bytes_to_long, long_to_bytes
from gpsoauth import android_key_7_3_29, b64_key_7_3_29


def test_static_signature():
    username = "someone@google.com"
    password = "apassword"
    assert signature(username, password, android_key_7_3_29).startswith(b"AFcb4K")


def test_conversion_roundtrip():
    assert long_to_bytes(bytes_to_long(b64_key_7_3_29)) == b64_key_7_3_29