Ejemplo n.º 1
0
    def test_generating_protocol_twice_displays_error_message(self, browser):
        self.setup_protocol(browser)
        browser.open(GenerateProtocol.url_for(self.meeting))

        browser.open(GenerateProtocol.url_for(self.meeting))
        self.assertEqual('The protocol for meeting My meeting has already '
                         'been generated.', error_messages()[0])
Ejemplo n.º 2
0
    def test_generating_protocol_twice_displays_error_message(self, browser):
        self.setup_protocol(browser)
        browser.open(GenerateProtocol.url_for(self.meeting))

        browser.open(GenerateProtocol.url_for(self.meeting))
        self.assertEqual(
            'The protocol for meeting My meeting has already '
            'been generated.',
            error_messages()[0])
Ejemplo n.º 3
0
    def url_generate_protocol(self):
        if is_word_meeting_implementation_enabled():
            return self.url_merge_docx_protocol()

        if not self.model.has_protocol_document():
            return GenerateProtocol.url_for(self.model)
        else:
            return UpdateProtocol.url_for(self.model)
Ejemplo n.º 4
0
    def test_zip_export_includes_generated_protocol(self, browser):
        self.login(self.committee_responsible, browser)
        browser.open(GenerateProtocol.url_for(self.meeting.model))
        self.assertTrue(self.meeting.model.has_protocol_document())

        browser.open(self.meeting, view='export-meeting-zip')
        zip_file = ZipFile(StringIO(browser.contents), 'r')
        self.assertIn('Protocol-9. Sitzung der Rechnungsprufungskommission.docx',
                      zip_file.namelist())
Ejemplo n.º 5
0
    def test_zip_export_generate_protocol_if_outdated(self, browser):
        self.activate_feature('word-meeting')
        self.login(self.committee_responsible, browser)
        browser.open(GenerateProtocol.url_for(self.meeting.model))

        browser.open(self.meeting, view='export-meeting-zip')
        zip_file = ZipFile(StringIO(browser.contents), 'r')
        self.assertIn('Protocol-9. Sitzung der Rechnungsprufungskommission.docx',
                      zip_file.namelist())

        browser.open(self.meeting, view='edit-meeting')
        browser.fill({'Title': 'New Meeting Title'}).save()

        browser.open(self.meeting, view='export-meeting-zip')
        zip_file = ZipFile(StringIO(browser.contents), 'r')
        self.assertIn('Agendaitem list-New Meeting Title.docx',
                      zip_file.namelist())
Ejemplo n.º 6
0
 def url_generate_protocol(self):
     if not self.model.has_protocol_document():
         return GenerateProtocol.url_for(self.model)
     else:
         return UpdateProtocol.url_for(self.model)
Ejemplo n.º 7
0
 def url_generate_protocol(self):
     if not self.model.has_protocol_document():
         return GenerateProtocol.url_for(self.model)
     else:
         return UpdateProtocol.url_for(self.model)