Initial code commit

This commit is contained in:
Bradlee Speice
2017-03-19 02:16:29 -04:00
commit a7884d5fe0
13 changed files with 215 additions and 0 deletions

0
tests/__init__.py Normal file
View File

View 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
View 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)