示例#1
0
 def test_event_keys(self):
     sn = api.Session(auth.username, auth.key)
     matches = api.get_matches(sn, "2017tur", response="keys")
     tdata = {"shape": (128, 1),
              "args": ["event", "2017tur", "matches", "keys"],
              "spotcheck": (60, "key", "2017tur_qm43")}
     CheckResults.frame(matches, tdata)
示例#2
0
 def test_event_full(self):
     sn = api.Session(auth.username, auth.key)
     sn.time_zone = "America/Chicago"
     matches = api.get_matches(sn, "2017tur")
     tdata = {"shape": (770, 47), "args": ["event", "2017tur", "matches"]}
     CheckResults.frame(matches, tdata)
     assert matches.loc["2017tur_f1m2"].at["frc1318", "score"] == 461
示例#3
0
 def test_team_year_full(self):
     sn = api.Session(auth.username, auth.key)
     matches = api.get_matches(sn, team="frc1318", year="2017")
     tdata = {"shape": (642, 47),
              "args": ["team", "frc1318", "matches", "2017"]}
     assert matches.loc["2017tur_f1m1"].at["frc2046",
                                           "teleopFuelPoints"] == 21
     CheckResults.frame(matches, tdata)
示例#4
0
 def test_match(self):
     sn = api.Session(auth.username, auth.key)
     matches = api.get_matches(sn, match="2017wasno_qm79")
     tdata = {"shape": (6, 47),
              "args": ["match", "2017wasno_qm79"]}
     CheckResults.frame(matches, tdata)
     act_time = matches.loc["2017wasno_qm79"].at["frc4077", "actual_time"]
     CheckResults.timestamp(act_time,
                            2017, 3, 26, 11, 24, 20, 61200)
示例#5
0
 def test_event_team_simple(self):
     sn = api.Session(auth.username, auth.key)
     matches = api.get_matches(sn, "2017tur", team="frc1318",
                               response="simple")
     tdata = {"shape": (102, 12),
              "args": ["team", "frc1318", "event", "2017tur", "matches",
                       "simple"]}
     assert matches.loc["2017tur_qm52"].at["frc1318", "score"] == 253
     CheckResults.frame(matches, tdata)
示例#6
0
 def test_event_simple(self):
     sn = api.Session(auth.username, auth.key, time_zone="America/Chicago")
     matches = api.get_matches(sn, "2017tur", response="simple")
     tdata = {"shape": (770, 12),
              "args": ["event", "2017tur", "matches", "simple"]}
     CheckResults.frame(matches, tdata)
     CheckResults.timestamp(matches.loc["2017tur_f1m2"].at["frc2046",
                                                           "time"],
                            2017, 4, 22, 12, 13, 0, 68400)
     assert matches.attr["timezone"] == "America/Chicago"