# Path: nba_data/deserializers/roto_wire/player_news_items.py
# class RotoWirePlayerNewsItemsDeserializer:
#     def __init__(self):
#         pass
# 
#     list_items_field_name = 'ListItems'
# 
#     @staticmethod
#     def deserialize(data):
#         return [
#             RotoWirePlayerNewsItemDeserializer.deserialize(data=player_news_item)
#             for player_news_item in data[RotoWirePlayerNewsItemsDeserializer.list_items_field_name]
#         ]
# 
# Path: tests/config.py
# ROOT_DIRECTORY = root_path = os.path.dirname(os.path.dirname(__file__))


import json
import os
from unittest import TestCase
from nba_data.deserializers.roto_wire.player_news_items import RotoWirePlayerNewsItemsDeserializer
from tests.config import ROOT_DIRECTORY
# -*- coding: utf-8 -*-




class TestRotoWirePlayerNewsItemsDeserializer(TestCase):
    def test_instantiation(self):
        deserializer = RotoWirePlayerNewsItemsDeserializer()
        self.assertTrue(deserializer.__dict__ == {})

    def test_deserialize_common_all_players(self):
        with open(os.path.join(ROOT_DIRECTORY, 'tests/files/rotowire_player_news.json')) as data_file:
            data = json.load(data_file)

# Path: nba_data/deserializers/roto_wire/player_news_items.py
# class RotoWirePlayerNewsItemsDeserializer:
#     def __init__(self):
#         pass
# 
#     list_items_field_name = 'ListItems'
# 
#     @staticmethod
#     def deserialize(data):
#         return [
#             RotoWirePlayerNewsItemDeserializer.deserialize(data=player_news_item)
#             for player_news_item in data[RotoWirePlayerNewsItemsDeserializer.list_items_field_name]
#         ]
# 
# Path: tests/config.py
# ROOT_DIRECTORY = root_path = os.path.dirname(os.path.dirname(__file__))


# Path: nba_data/deserializers/roto_wire/test_rotoWirePlayerNewsItemsDeserializer.py
import json
import os
from unittest import TestCase
from nba_data.deserializers.roto_wire.player_news_items import RotoWirePlayerNewsItemsDeserializer
from tests.config import ROOT_DIRECTORY

# -*- coding: utf-8 -*-




class TestRotoWirePlayerNewsItemsDeserializer(TestCase):
    def test_instantiation(self):
        deserializer = RotoWirePlayerNewsItemsDeserializer()
        self.assertTrue(deserializer.__dict__ == {})

    def test_deserialize_common_all_players(self):
        with open(os.path.join(ROOT_DIRECTORY, 'tests/files/rotowire_player_news.json')) as data_file:
            data = json.load(data_file)

            deserialized_player_news = RotoWirePlayerNewsItemsDeserializer.deserialize(data)