def test_add_identifier(self):
        testID = TestDict(**{
            'type': None,
            'generic': [TestDict(**{'value': 'hello'})]
        })

        idRec = ESDoc.addIdentifier(testID)
        self.assertEqual(idRec.id_type, 'generic')
        self.assertEqual(idRec.identifier, 'hello')
예제 #2
0
    def test_add_identifier(self):
        testID = TestDict(**{
            'type': None,
            'generic': [
                TestDict(**{
                    'value': 'hello'
                })
            ]
        })

        idRec = ESDoc.addIdentifier(testID)
        assert idRec.id_type == 'generic'
        assert idRec.identifier == 'hello'