Skip to content

Commit

Permalink
sample tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Mar 2, 2024
1 parent 9d330c8 commit 8f39bab
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
13 changes: 0 additions & 13 deletions integration/sample.py

This file was deleted.

24 changes: 24 additions & 0 deletions integration/test_account.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import berserk

def test_account_get():
session = berserk.TokenSession('lip_bobby')
client = berserk.Client(session, base_url="http://lila:9663")

me = client.account.get()
assert me['id'] == 'bobby'


def test_account_get_email():
session = berserk.TokenSession('lip_bobby')
client = berserk.Client(session, base_url="http://lila:9663")

assert client.account.get_email() == 'bobby@localhost'


def test_account_get_set_kid_mode():
session = berserk.TokenSession('lip_bobby')
client = berserk.Client(session, base_url="http://lila:9663")

assert client.account.get_kid_mode() == False
client.account.set_kid_mode(True)
assert client.account.get_kid_mode() == True
8 changes: 8 additions & 0 deletions integration/test_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import berserk

def test_account_get():
client = berserk.Client(base_url="http://lila:9663")

top_10 = client.users.get_all_top_10()

assert len(top_10['bullet']) == 10

0 comments on commit 8f39bab

Please sign in to comment.