def test_get_snapshot_image_dependent(self):
        project = self.create_project()
        plan_1 = self.create_plan(project)
        plan_2 = self.create_plan(project)
        plan_1.snapshot_plan_id = plan_2.id
        snapshot = self.create_snapshot(project)
        snapshot_image_1 = self.create_snapshot_image(snapshot, plan_1)
        snapshot_image_2 = self.create_snapshot_image(snapshot, plan_2)

        assert snapshot_image_2 == JobStepDetailsAPIView.get_snapshot_image(snapshot.id, plan_1.id)
        assert snapshot_image_2 == JobStepDetailsAPIView.get_snapshot_image(snapshot.id, plan_2.id)
Exemple #2
0
    def test_get_snapshot_image_dependent(self):
        project = self.create_project()
        plan_1 = self.create_plan(project)
        plan_2 = self.create_plan(project)
        plan_1.snapshot_plan_id = plan_2.id
        snapshot = self.create_snapshot(project)
        snapshot_image_1 = self.create_snapshot_image(snapshot, plan_1)
        snapshot_image_2 = self.create_snapshot_image(snapshot, plan_2)

        assert snapshot_image_2 == JobStepDetailsAPIView.get_snapshot_image(
            snapshot.id, plan_1.id)
        assert snapshot_image_2 == JobStepDetailsAPIView.get_snapshot_image(
            snapshot.id, plan_2.id)
Exemple #3
0
 def test_get_snapshot_image_independent(self):
     project = self.create_project()
     plan = self.create_plan(project)
     snapshot = self.create_snapshot(project)
     snapshot_image = self.create_snapshot_image(snapshot, plan)
     assert snapshot_image == JobStepDetailsAPIView.get_snapshot_image(
         snapshot.id, plan.id)
 def test_get_snapshot_image_independent(self):
     project = self.create_project()
     plan = self.create_plan(project)
     snapshot = self.create_snapshot(project)
     snapshot_image = self.create_snapshot_image(snapshot, plan)
     assert snapshot_image == JobStepDetailsAPIView.get_snapshot_image(snapshot.id, plan.id)