Remove testing api (not needed anymore)

This commit is contained in:
Ken Roberts 2015-01-05 10:54:44 -08:00
parent 2e9f274027
commit 093f853fd9
2 changed files with 3 additions and 5 deletions

View File

@ -159,7 +159,7 @@ class ProjectorEditForm(QDialog, Ui_ProjectorEditForm):
self.button_box.helpRequested.connect(self.help_me)
self.button_box.rejected.connect(self.cancel_me)
def exec_(self, projector=None, test=False):
def exec_(self, projector=None):
if projector is None:
self.projector = Projector()
self.new_projector = True
@ -168,8 +168,6 @@ class ProjectorEditForm(QDialog, Ui_ProjectorEditForm):
self.new_projector = False
self.retranslateUi(self)
reply = QDialog.exec_(self)
if not test:
self.projector = None
return reply
@pyqtSlot()

View File

@ -89,7 +89,7 @@ class TestProjectorEditForm(TestCase, TestMixin):
with patch('openlp.core.ui.projector.editform.QDialog.exec_'):
# WHEN: Calling edit form with no parameters
self.projector_form.exec_(test=True)
self.projector_form.exec_()
item = self.projector_form.projector
# THEN: Should be creating a new instance
@ -108,7 +108,7 @@ class TestProjectorEditForm(TestCase, TestMixin):
with patch('openlp.core.ui.projector.editform.QDialog.exec_'):
# WHEN: Calling edit form with existing projector instance
self.projector_form.exec_(projector=TEST1_DATA, test=True)
self.projector_form.exec_(projector=TEST1_DATA)
item = self.projector_form.projector
# THEN: Should be editing an existing entry