コード例 #1
0
    def test_filter_matches_only_given_teams(self):
        f = TeamNameFilter(["teamA", "teamC"], only_these_teams=True)
        matches = self.get_matches()
        matches_f = f.filter(matches)

        self.assertEquals(1, len(matches_f))
        self.assertEquals(matches[2], matches_f[0])
コード例 #2
0
    def test_filter_matches(self):
        f = TeamNameFilter(["teamA"])
        matches = self.get_matches()
        matches_f = f.filter(matches)

        self.assertEquals(2, len(matches_f))
        self.assertEquals(matches[0], matches_f[0])
        self.assertEquals(matches[2], matches_f[1])
コード例 #3
0
    def test_filter_no_matches_only_given_teams(self):
        f = TeamNameFilter(["teamX", "teamY"], only_these_teams=True)
        matches = self.get_matches()
        matches_f = f.filter(matches)

        self.assertEquals(0, len(matches_f))
コード例 #4
0
    def test_filter_no_matches(self):
        f = TeamNameFilter(["teamX"])
        matches = self.get_matches()
        matches_f = f.filter(matches)

        self.assertEquals(0, len(matches_f))