ch11-24: clean up by @eumiro & sync with Atlas
This commit is contained in:
24
23-dyn-attr-prop/oscon/test_schedule_v1.py
Normal file
24
23-dyn-attr-prop/oscon/test_schedule_v1.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import pytest
|
||||
|
||||
import schedule_v1 as schedule
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def records():
|
||||
yield schedule.load(schedule.JSON_PATH)
|
||||
|
||||
|
||||
def test_load(records):
|
||||
assert len(records) == 895
|
||||
|
||||
|
||||
def test_record_attr_access():
|
||||
rec = schedule.Record(spam=99, eggs=12)
|
||||
assert rec.spam == 99
|
||||
assert rec.eggs == 12
|
||||
|
||||
|
||||
def test_venue_record(records):
|
||||
venue = records['venue.1469']
|
||||
assert venue.serial == 1469
|
||||
assert venue.name == 'Exhibit Hall C'
|
||||
Reference in New Issue
Block a user