<reponame>willemvlh/bbref-scraper
from bballer.models.player import PlayerShell
from bballer.models.team import TeamShell
from tests.scrapers.utils import get_resource


class TestPlayerShell:
    def test_as_player(self):
        shell = PlayerShell("<NAME>", get_resource("lebron_james.html"))
        assert repr(shell) == "<NAME>"
        player = shell.as_player()
        assert player.name == "<NAME>"


class TestTeamShell:
    def test_as_team(self):
        shell = TeamShell("C<NAME>", get_resource("cavs.html"))
        assert repr(shell) == "<NAME>"
        team = shell.as_team()
        assert team.name == "<NAME>"

from bballer.models.player import PlayerShell
from bballer.models.team import TeamShell
from tests.scrapers.utils import get_resource


class TestPlayerShell:
    def test_as_player(self):
        shell = PlayerShell("<NAME>", get_resource("lebron_james.html"))
        assert repr(shell) == "<NAME>"
        player = shell.as_player()
        assert player.name == "<NAME>"


class TestTeamShell:
    def test_as_team(self):
        shell = TeamShell("C<NAME>", get_resource("cavs.html"))
        assert repr(shell) == "<NAME>"
        team = shell.as_team()
        assert team.name == "<NAME>"