Merge pull request #9 from owogawc/6-add-louisiana-testing

testing added for louisiana
main
Taylor Hood 2 years ago committed by GitHub
commit bbef990c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,22 @@
import unittest
import requests
from lottery_data_scraper import louisiana
from lottery_data_scraper import schemas
class TestLouisiana(unittest.TestCase):
def test_parse_game_html(self):
# URL chosen arbitrarily
url = 'https://louisianalottery.com/scratch-offs/1450/blazing-suits'
html = louisiana.fetch_html(url)
game = louisiana.parse_game(url, html)
self.assertEqual(game['name'], 'Blazing Suits')
self.assertEqual(game["price"], 10.0)
self.assertEqual(
game["url"],
'https://louisianalottery.com/scratch-offs/1450/blazing-suits' ,
)
self.assertEqual(game["game_id"], "1450")
self.assertEqual(game["prizes"][0]["prize"], "$200,000")
self.assertEqual(game["prizes"][0]["value"], 200000.0)
Loading…
Cancel
Save