Ejemplo n.º 1
0
def test_generate_driver_report():
    driver = Driver("Dan")
    driver.add_trip(Trip.parse("07:15", "07:45", "17.3"))
    driver.add_trip(Trip.parse("06:12", "06:32", "21.8"))

    report = driver.get_report()
    report.should.equal("Dan: 39 miles @ 47 mph")
Ejemplo n.º 2
0
def test_generate_driver_report_no_trips():
    driver = Driver("Bob")

    report = driver.get_report()
    report.should.equal("Bob: 0 miles")