mirror of
https://github.com/bspeice/playwithfriends
synced 2025-07-03 06:45:04 -04:00
Initial code commit
This commit is contained in:
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
16
tests/test_intersections.py
Normal file
16
tests/test_intersections.py
Normal file
@ -0,0 +1,16 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from playwithfriends import intersections
|
||||
|
||||
|
||||
class TestIntersections(TestCase):
|
||||
|
||||
def test_xannort_shares_project_cars(self):
|
||||
steam_id_left = '76561198020882912'
|
||||
steam_id_right = '76561198069992619'
|
||||
|
||||
inter_games = intersections.intersecting_games(
|
||||
steamid_left=steam_id_left, steamid_right=steam_id_right
|
||||
)
|
||||
|
||||
self.assertIn('Project CARS', inter_games.values())
|
21
tests/test_steam.py
Normal file
21
tests/test_steam.py
Normal file
@ -0,0 +1,21 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from playwithfriends import steam
|
||||
|
||||
|
||||
class SteamTest(TestCase):
|
||||
|
||||
def test_returns_friends_list(self):
|
||||
steam_id = '76561198020882912'
|
||||
friends = steam.SteamAPI().get_friends(steam_id)
|
||||
self.assertTrue(len(friends) > 0)
|
||||
|
||||
def test_I_own_games(self):
|
||||
steam_id = '76561198020882912'
|
||||
games = steam.SteamAPI().get_games(steam_id)
|
||||
self.assertTrue(len(games) > 0)
|
||||
|
||||
def test_Ive_recently_played_games(self):
|
||||
steam_id = '76561198020882912'
|
||||
games = steam.SteamAPI().get_recent_games(steam_id)
|
||||
self.assertTrue(len(games) > 0)
|
Reference in New Issue
Block a user