예제 #1
0
    def recognition(self):

        examples = ['bar', rss, atom]

        for value in examples:
            with attest.raises(imprt.InputError):
                imprt.wordpress(value)
예제 #2
0
    def recognition(self):

        examples = [
            'bar', rss, atom
        ]

        for value in examples:
            with attest.raises(imprt.InputError):
                imprt.wordpress(value)
예제 #3
0
    def additional_metadata(self):

        defaults, items = imprt.wordpress(wordpress)

        assert 'type' in items[1]
        assert items[1]['type'] == 'page'

        assert 'draft' in items[2]
        assert items[2]['draft']
예제 #4
0
    def defaults(self):

        defaults, items = imprt.wordpress(wordpress)
        entry = items[0]

        for key in 'title', 'link', 'content', 'date', 'author', 'tags':
            assert key in entry

        assert len(entry['tags']) == 1
예제 #5
0
    def additional_metadata(self):

        defaults, items = imprt.wordpress(wordpress)

        assert 'type' in items[1]
        assert items[1]['type'] == 'page'

        assert 'draft' in items[2]
        assert items[2]['draft']
예제 #6
0
    def defaults(self):

        defaults, items = imprt.wordpress(wordpress)
        entry = items[0]

        for key in 'title', 'link', 'content', 'date', 'author', 'tags':
            assert key in entry

        assert len(entry['tags']) == 1