add tss tournament stuff (#1349)
This commit is contained in:
@@ -79,6 +79,22 @@ def test_normalize_side():
|
||||
assert tt.normalize_side("Group") == "group"
|
||||
|
||||
|
||||
def test_apply_tournament_side_context_moves_double_elim_semifinal_to_loser():
|
||||
matches = [
|
||||
{"type_bracket": "Winner", "side": "winner"},
|
||||
{"type_bracket": "Looser", "side": "loser"},
|
||||
{"type_bracket": "Semifinal", "side": "final"},
|
||||
{"type_bracket": "Final", "side": "final"},
|
||||
]
|
||||
tt.apply_tournament_side_context(matches)
|
||||
assert matches[2]["side"] == "loser"
|
||||
assert matches[3]["side"] == "final"
|
||||
|
||||
single_elim = [{"type_bracket": "Semifinal", "side": "final"}]
|
||||
tt.apply_tournament_side_context(single_elim)
|
||||
assert single_elim[0]["side"] == "final"
|
||||
|
||||
|
||||
def test_derive_format():
|
||||
assert tt.derive_format([], "double-elumination") == "double-elim"
|
||||
assert tt.derive_format([], "single-elumination") == "single-elim"
|
||||
|
||||
Reference in New Issue
Block a user