コード例 #1
0
    class Serialization(Spec):
        def before_all(self):
            self.job_ex = JobExecution(tenant_id='123',
                                       job_id='1001',
                                       run_number='2012',
                                       status='in-progress')

        def can_serialize_to_a_dictionary(self):
            job_dict = self.job_ex.as_dict()

            expect(job_dict['id']).to.equal(self.job_ex.job_id)
            expect(job_dict['tenant_id']).to.equal(self.job_ex.tenant_id)
            expect(job_dict['run_number']).to.equal(self.job_ex.run_number)
            expect(job_dict['status']).to.equal(self.job_ex.status)
コード例 #2
0
ファイル: job_execution.py プロジェクト: CloudRift/Rift
    class Serialization(Spec):
        def before_all(self):
            self.job_ex = JobExecution(
                tenant_id='123',
                job_id='1001',
                run_number='2012',
                status='in-progress'
            )

        def can_serialize_to_a_dictionary(self):
            job_dict = self.job_ex.as_dict()

            expect(job_dict['id']).to.equal(self.job_ex.job_id)
            expect(job_dict['tenant_id']).to.equal(self.job_ex.tenant_id)
            expect(job_dict['run_number']).to.equal(self.job_ex.run_number)
            expect(job_dict['status']).to.equal(self.job_ex.status)