Last change
on this file since 96 was 96, checked in by Bart Vastenhouw, 2 years ago |
Fixed small issues in domaineditor.
|
File size:
1.2 KB
|
Rev | Line | |
---|
[96] | 1 | import unittest
|
---|
| 2 | from unitpy.GeneralTests import GeneralTests
|
---|
| 3 | from geniusweb.protocol.tournament.Team import Team
|
---|
| 4 | from geniusweb.references.PartyRef import PartyRef
|
---|
| 5 | from geniusweb.references.Parameters import Parameters
|
---|
| 6 | from geniusweb.references.PartyWithParameters import PartyWithParameters
|
---|
| 7 | from typing import List
|
---|
| 8 | from uri.uri import URI
|
---|
| 9 |
|
---|
| 10 | class 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.