Example #1
0
 def setUp(self):
     super(TeamListTests, self).setUp()
     from kardboard.models import TeamList, Team
     self.TeamList = TeamList
     self.teams = TeamList(
         Team('Team 1'),
         Team('Team 2'),
     )
Example #2
0
class TeamListTests(unittest2.TestCase):
    def setUp(self):
        super(TeamListTests, self).setUp()
        from kardboard.models import TeamList, Team
        self.TeamList = TeamList
        self.teams = TeamList(
            Team('Team 1'),
            Team('Team 2'),
        )

    def test_names(self):
        assert ['Team 1', 'Team 2'] == self.teams.names

    def test_mapping(self):
        expected = {
            'team-1': 'Team 1',
            'team-2': 'Team 2',
        }
        actual = self.teams.slug_name_mapping
        assert expected == actual

    def test_find_by_name(self):
        expected = self.teams[1]
        actual = self.teams.find_by_name('Team 2')
        assert expected == actual
Example #3
0
class TeamListTests(unittest2.TestCase):
    def setUp(self):
        super(TeamListTests, self).setUp()
        from kardboard.models import TeamList, Team
        self.TeamList = TeamList
        self.teams = TeamList(
            Team('Team 1'),
            Team('Team 2'),
        )

    def test_names(self):
        assert ['Team 1', 'Team 2'] == self.teams.names

    def test_mapping(self):
        expected = {
            'team-1': 'Team 1',
            'team-2': 'Team 2',
        }
        actual = self.teams.slug_name_mapping
        assert expected == actual

    def test_find_by_name(self):
        expected = self.teams[1]
        actual = self.teams.find_by_name('Team 2')
        assert expected == actual
Example #4
0
 def setUp(self):
     super(TeamListTests, self).setUp()
     from kardboard.models import TeamList, Team
     self.TeamList = TeamList
     self.teams = TeamList(
         Team('Team 1'),
         Team('Team 2'),
     )