class Plan(JsonState, db.Model): ''' The test run's plan. ''' _id = db.Column('id', db.Integer, primary_key=True) _test_run_id = db.Column('test_run_id', db.Integer, db.ForeignKey('test_run.id')) test_run = db.relationship('TestRun') _state = db.Column('state', db.Text) def __init__(self, test_run, state): self.test_run = test_run super().__init__(state)
class Snapshot(JsonState, db.Model): ''' A snapshot of a test run's current progress. ''' _id = db.Column('id', db.Integer, primary_key=True) _test_run_id = db.Column('test_run_id', db.Integer, db.ForeignKey('test_run.id')) test_run = db.relationship('TestRun') _state = db.Column('state', db.Text) def __init__(self, test_run, state): self.test_run = test_run super().__init__(state)