forked from openlp/openlp
Update to automate the date in the display.
Add more guilty parties to the display lp:~trb143/openlp/about (revision 2715) [SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1890/ [SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1801/ [SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1740/ [SUCCESS] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1476/ [SUCCESS] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/1066/ [SUCCESS] https://ci.openlp.i... bzr-revno: 2715
This commit is contained in:
commit
a9c474103f
@ -19,6 +19,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
import datetime
|
||||||
|
|
||||||
from PyQt5 import QtGui, QtWidgets
|
from PyQt5 import QtGui, QtWidgets
|
||||||
|
|
||||||
@ -112,9 +113,12 @@ class UiAboutDialog(object):
|
|||||||
'Jonathan "springermac" Springer', 'Philip "Phill" Ridout']
|
'Jonathan "springermac" Springer', 'Philip "Phill" Ridout']
|
||||||
contributors = ['Stuart "sibecker" Becker', 'Gerald "jerryb" Britton', 'Jonathan "gushie" Corwin',
|
contributors = ['Stuart "sibecker" Becker', 'Gerald "jerryb" Britton', 'Jonathan "gushie" Corwin',
|
||||||
'Samuel "MrGamgee" Findlay', 'Michael "cocooncrash" Gorven', 'Scott "sguerrieri" Guerrieri',
|
'Samuel "MrGamgee" Findlay', 'Michael "cocooncrash" Gorven', 'Scott "sguerrieri" Guerrieri',
|
||||||
'Matthias "matthub" Hub', 'Meinert "m2j" Jordan', 'Armin "orangeshirt" K\xf6hler',
|
'Simon Hanna', 'Chris Hill',
|
||||||
'Rafael "rafaellerm" Lerm', 'Erik "luen" Lundin', 'Edwin "edwinlunando" Lunando',
|
'Matthias "matthub" Hub', 'Meinert "m2j" Jordan', 'Ian Knightly'
|
||||||
|
'Armin "orangeshirt" K\xf6hler',
|
||||||
|
'Rafael "rafaellerm" Lerm', 'Gabriel loo', 'Erik "luen" Lundin', 'Edwin "edwinlunando" Lunando',
|
||||||
'Dmitriy Marmyshev', 'Brian "brianmeyer" Meyer', 'Joshua "milleja46" Miller',
|
'Dmitriy Marmyshev', 'Brian "brianmeyer" Meyer', 'Joshua "milleja46" Miller',
|
||||||
|
'Suutari "Azaziah" Olli',
|
||||||
'Stevan "ElderP" Pettit', 'Mattias "mahfiaz" P\xf5ldaru', 'Felipe Polo-Wood',
|
'Stevan "ElderP" Pettit', 'Mattias "mahfiaz" P\xf5ldaru', 'Felipe Polo-Wood',
|
||||||
'Christian "crichter" Richter', 'Arjan "arjans" Schrijver', 'Simon "samscudder" Scudder',
|
'Christian "crichter" Richter', 'Arjan "arjans" Schrijver', 'Simon "samscudder" Scudder',
|
||||||
'Jeffrey "whydoubt" Smith', 'Stefan Strasser', 'Maikel Stuivenberg', 'Martin "mijiti" Thompson',
|
'Jeffrey "whydoubt" Smith', 'Stefan Strasser', 'Maikel Stuivenberg', 'Martin "mijiti" Thompson',
|
||||||
@ -189,7 +193,8 @@ class UiAboutDialog(object):
|
|||||||
' Qt5: http://qt.io\n'
|
' Qt5: http://qt.io\n'
|
||||||
' PyQt5: http://www.riverbankcomputing.co.uk/software/pyqt/intro\n'
|
' PyQt5: http://www.riverbankcomputing.co.uk/software/pyqt/intro\n'
|
||||||
' Oxygen Icons: http://techbase.kde.org/Projects/Oxygen/\n'
|
' Oxygen Icons: http://techbase.kde.org/Projects/Oxygen/\n'
|
||||||
' MuPDF: http://www.mupdf.com/\n')
|
' MuPDF: http://www.mupdf.com/\n'
|
||||||
|
' MediaInfo: https://mediaarea.net/en/MediaInfo\n')
|
||||||
final_credit = translate('OpenLP.AboutForm', 'Final Credit\n'
|
final_credit = translate('OpenLP.AboutForm', 'Final Credit\n'
|
||||||
' "For God so loved the world that He gave\n'
|
' "For God so loved the world that He gave\n'
|
||||||
' His one and only Son, so that whoever\n'
|
' His one and only Son, so that whoever\n'
|
||||||
@ -299,16 +304,17 @@ class UiAboutDialog(object):
|
|||||||
self.about_notebook.setTabText(self.about_notebook.indexOf(self.credits_tab),
|
self.about_notebook.setTabText(self.about_notebook.indexOf(self.credits_tab),
|
||||||
translate('OpenLP.AboutForm', 'Credits'))
|
translate('OpenLP.AboutForm', 'Credits'))
|
||||||
cr_others = ('Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
|
cr_others = ('Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
|
||||||
'Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, '
|
'Michael Gorven, Scott Guerrieri, Simon Hanna, Chris, Hill Matthias Hub, Meinert Jordan, '
|
||||||
'Armin K\xf6hler, Erik Lundin, Edwin Lunando, Joshua Miller, '
|
'Ian Knightley, Armin K\xf6hler, Gabriel Loo, Erik Lundin, Edwin Lunando, Joshua Miller, '
|
||||||
'Brian T. Meyer, Stevan Pettit, Andreas Preikschat, '
|
'Brian T. Meyer, Suutari Olli, Stevan Pettit, Andreas Preikschat, '
|
||||||
'Mattias P\xf5ldaru, Christian Richter, Philip Ridout, '
|
'Mattias P\xf5ldaru, Christian Richter, Philip Ridout, '
|
||||||
'Ken Roberts, Simon Scudder, Jeffrey Smith, Maikel Stuivenberg, '
|
'Ken Roberts, Simon Scudder, Jeffrey Smith, Maikel Stuivenberg, '
|
||||||
'Martin Thompson, Jon Tibble, Dave Warnock, Frode Woldsund, '
|
'Martin Thompson, Jon Tibble, Dave Warnock, Frode Woldsund, '
|
||||||
'Martin Zibricky, Patrick Zimmermann')
|
'Martin Zibricky, Patrick Zimmermann')
|
||||||
copyright_note = translate('OpenLP.AboutForm',
|
copyright_note = translate('OpenLP.AboutForm',
|
||||||
'Copyright \xa9 2004-2017 {cr}\n\n'
|
'Copyright \xa9 2004-{yr} {cr}\n\n'
|
||||||
'Portions copyright \xa9 2004-2017 {others}').format(cr='Raoul Snyman',
|
'Portions copyright \xa9 2004-{yr} {others}').format(cr='Raoul Snyman',
|
||||||
|
yr=datetime.date.today().year,
|
||||||
others=cr_others)
|
others=cr_others)
|
||||||
licence = translate('OpenLP.AboutForm',
|
licence = translate('OpenLP.AboutForm',
|
||||||
'This program is free software; you can redistribute it and/or '
|
'This program is free software; you can redistribute it and/or '
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
"""
|
"""
|
||||||
Package to test the openlp.core.ui.firsttimeform package.
|
Package to test the openlp.core.ui.firsttimeform package.
|
||||||
"""
|
"""
|
||||||
|
import datetime
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from openlp.core.ui.aboutform import AboutForm
|
from openlp.core.ui.aboutform import AboutForm
|
||||||
@ -58,4 +59,20 @@ class TestFirstTimeForm(TestCase, TestMixin):
|
|||||||
about_form = AboutForm(None)
|
about_form = AboutForm(None)
|
||||||
|
|
||||||
# THEN: The build number should be in the text
|
# THEN: The build number should be in the text
|
||||||
assert 'OpenLP 3.1.5 build 3000' in about_form.about_text_edit.toPlainText()
|
self.assertTrue('OpenLP 3.1.5 build 3000' in about_form.about_text_edit.toPlainText(),
|
||||||
|
"The build number should be set correctly")
|
||||||
|
|
||||||
|
def test_about_form_date_test(self):
|
||||||
|
"""
|
||||||
|
Test that the copyright date is included correctly
|
||||||
|
"""
|
||||||
|
# GIVEN: A correct application date
|
||||||
|
date_string = "2004-%s" % datetime.date.today().year
|
||||||
|
|
||||||
|
# WHEN: The about form is created
|
||||||
|
about_form = AboutForm(None)
|
||||||
|
license_text = about_form.license_text_edit.toPlainText()
|
||||||
|
|
||||||
|
# THEN: The date should be in the text twice.
|
||||||
|
self.assertTrue(license_text.count(date_string, 0) == 2,
|
||||||
|
"The text string should be added twice to the license string")
|
||||||
|
Loading…
Reference in New Issue
Block a user