source: geniuswebcore/test/geniusweb/protocol/tournament/TeamTest.py

Last change on this file was 100, checked in by ruud, 21 months ago

python installs also wheel to avoid error messages

File size: 1.2 KB
Line 
1import unittest
2from unitpy.GeneralTests import GeneralTests
3from geniusweb.protocol.tournament.Team import Team
4from geniusweb.references.PartyRef import PartyRef
5from geniusweb.references.Parameters import Parameters
6from geniusweb.references.PartyWithParameters import PartyWithParameters
7from typing import List
8from uri.uri import URI
9
10class TeamTest(unittest.TestCase, GeneralTests[Team]):
11
12 def setUp(self):
13 self.partyref1 = PartyRef(URI("party1"))
14 self.partyref2 = PartyRef(URI("party2"))
15 self.params1 = Parameters().With("a", 1)
16 self.pwithp1 = PartyWithParameters(self.partyref1, self.params1)
17 self.pwithp2 = PartyWithParameters(self.partyref2, self.params1)
18 self.team1 = Team([self.pwithp1])
19 self.team1a = Team([self.pwithp1])
20 self.team2 = Team([self.pwithp2])
21
22 #@Override
23 def getGeneralTestData(self) -> List[List[Team]]:
24 return [[self.team1, self.team1a],[self.team2]]
25
26 #@Override
27 def getGeneralTestStrings(self) -> List[str]:
28 return [".PartyRef.party1..a=1..",".PartyRef.party2..a=1.."]
29
30 #@Test
31 def testGet(self):
32 self.assertEqual([self.pwithp1], self.team1.getParties())
33
Note: See TracBrowser for help on using the repository browser.