Ejemplo n.º 1
0
    def test_get_tags_from_contents_no_tags_in_content(self, processing_options, conversion_settings):
        contents = [
            Paragraph(processing_options, [TextItem(processing_options, 'some text')]),
            Paragraph(processing_options, [TextItem(processing_options, 'some more text')]),
            Paragraph(processing_options, [TextItem(processing_options, 'even more text')]),
        ]
        note = NimbusNote(processing_options, contents, conversion_settings, 'My Note')

        expected = set()

        result = note.get_tags_from_contents()

        assert result == expected
Ejemplo n.º 2
0
    def test_get_tags_from_contents(self, processing_options, conversion_settings):
        contents = [
            Paragraph(processing_options, [TextItem(processing_options, '#tag1')]),
            Paragraph(processing_options, [TextItem(processing_options, '#tag2')]),
            Paragraph(processing_options, [TextItem(processing_options, 'some text')]),
        ]
        note = NimbusNote(processing_options, contents, conversion_settings, 'My Note')

        expected = {'#tag1', '#tag2'}

        result = note.get_tags_from_contents()

        assert result == expected