def test_edit_shot_button_opens_up_shot_editor_with_the_given_shot(self):
        """testing if hitting the edit shot button opens up the shot_editor
        dialog
        """
        proj1 = Project('Test Project')
        proj1.save()
        
        seq1 = Sequence(proj1, 'Test Sequence')
        seq1.save()
        
        shot = Shot(seq1, 1, 2, 435)
        shot.handle_at_start = 23
        shot.handle_at_end = 12
        shot.save()
        
        dialog1 = project_manager.MainDialog()
#        self.show_dialog(dialog1)
        
        # hit to the edit shot button
#        QTest.mouseClick(
#            dialog1.edit_shot_pushButton,
#            QtCore.Qt.LeftButton
#        )
        
        # check if the shot_editor dialog is opened
        # HOW ????
        self.fail('test is not finished yet')
    def test_edit_shot_button_opens_up_shot_editor_with_the_given_shot(self):
        """testing if hitting the edit shot button opens up the shot_editor
        dialog
        """
        proj1 = Project('Test Project')
        proj1.save()

        seq1 = Sequence(proj1, 'Test Sequence')
        seq1.save()

        shot = Shot(seq1, 1, 2, 435)
        shot.handle_at_start = 23
        shot.handle_at_end = 12
        shot.save()

        dialog1 = project_manager.MainDialog()
        #        self.show_dialog(dialog1)

        # hit to the edit shot button
        #        QTest.mouseClick(
        #            dialog1.edit_shot_pushButton,
        #            QtCore.Qt.LeftButton
        #        )

        # check if the shot_editor dialog is opened
        # HOW ????
        self.fail('test is not finished yet')
Exemplo n.º 3
0
 def test_shot_argument_is_a_shot_instance_will_fill_the_ui_with_shot_info(self):
     """testing if the ui is filled with correct info coming from the given
     shot
     """
     
     proj1 = Project('Test Project')
     proj1.save()
     
     seq1 = Sequence(proj1, 'Test Sequence')
     seq1.save()
     
     shot = Shot(seq1, 1, 2, 435)
     shot.handle_at_start = 23
     shot.handle_at_end = 12
     shot.save()
     
     dialog = shot_editor.MainDialog(shot=shot)
     
     # test if the "Editing Shot: SH001" is correctly updated
     self.assertEqual(
         shot.code,
         dialog.shot_name_label.text()
     )
     
     # test frame range info
     self.assertEqual(
         shot.start_frame,
         dialog.start_frame_spinBox.value()
     )
     
     self.assertEqual(
         shot.end_frame,
         dialog.end_frame_spinBox.value()
     )
     
     self.assertEqual(
         shot.handle_at_start,
         dialog.handle_at_start_spinBox.value()
     )
     
     self.assertEqual(
         shot.handle_at_end,
         dialog.handle_at_end_spinBox.value()
     )
Exemplo n.º 4
0
    def test_shot_info_of_the_given_shot_is_updated_correctly(self):
        """testing if the shot info is updated when clicked to ok
        """
        
        proj1 = Project('Test Project')
        proj1.save()
        
        seq1 = Sequence(proj1, 'Test Sequence')
        seq1.save()
        
        shot = Shot(seq1, 1, 2, 435)
        shot.handle_at_start = 23
        shot.handle_at_end = 12
        shot.save()
        
        start_frame = 132
        end_frame = 250
        handle_at_start = 11
        handle_at_end = 32
        
        dialog = shot_editor.MainDialog(shot=shot)
#        self.show_dialog(dialog)
        
        # now update the values
        dialog.start_frame_spinBox.setValue(start_frame)
        dialog.end_frame_spinBox.setValue(end_frame)
        dialog.handle_at_start_spinBox.setValue(handle_at_start)
        dialog.handle_at_end_spinBox.setValue(handle_at_end)
        
        # hit ok
        QTest.mouseClick(
            dialog.buttonBox.buttons()[0],
            QtCore.Qt.LeftButton
        )
        
        # now check if the shot is updated
        self.assertEqual(start_frame, shot.start_frame)
        self.assertEqual(end_frame, shot.end_frame)
        self.assertEqual(handle_at_start, shot.handle_at_start)
        self.assertEqual(handle_at_end, shot.handle_at_end)