Пример #1
0
    def test_add_link(self):
        testLink = TestDict(**{
            'url': 'test/url',
            'media_type': 'test',
            'flags': '{\"local\": false}',
            'id': 1
        })

        linkRec = ESDoc.addLink(testLink)
        assert linkRec.url ==  'test/url'
        assert linkRec.media_type == 'test'
        assert linkRec.local == False
    def test_add_link(self):
        testLink = TestDict(
            **{
                'url': 'test/url',
                'media_type': 'test',
                'flags': '{\"local\": false}',
                'id': 1
            })

        linkRec = ESDoc.addLink(testLink)
        self.assertEqual(linkRec.url, 'test/url')
        self.assertEqual(linkRec.media_type, 'test')
        self.assertEqual(linkRec.local, False)