예제 #1
0
    def test_delete_document_not_exist(self):
        """Test delee document not existing"""

        with self.app.app_context():
            inst_doc = Document(self.db_inst.collection)

            with self.assertRaises(gmap_exceptions.DocumentNotExist):
                inst_doc.delete_document('doc04')
예제 #2
0
    def test_delete_document(self):
        """Test get document"""
        col_name = 'test_collection_db'
        self._import_bulk(col_name)

        inst_doc = Document(self.db_inst.collection)
        inst_doc.delete_document('doc04')

        with self.assertRaises(gmap_exceptions.DocumentNotExist):
            inst_doc.get_document('doc04')
예제 #3
0
def delete_edge(name, key):
    """Get edge from Database"""

    constructor = Constructor()
    inst_edge = constructor.factory(kind='Edges', name=name)

    inst_doc = Document(inst_edge)
    inst_doc.delete_document(key)

    return True
예제 #4
0
def delete_document(name, key):
    """Get document from Database"""

    constructor = Constructor()
    inst_coll = constructor.factory(kind='Collection', name=name)

    inst_doc = Document(inst_coll)
    inst_doc.delete_document(key)

    return True
예제 #5
0
    def test_delete_document(self):
        """Test get document"""
        col_name = 'test_collection_db'
        self._import_bulk(col_name)

        inst_doc = Document(self.db_inst.collection)
        inst_doc.delete_document('doc04')

        with self.assertRaises(gmap_exceptions.DocumentNotExist):
            inst_doc.get_document('doc04')
예제 #6
0
def delete_edge(name, key):
    """Get edge from Database"""

    constructor = Constructor()
    inst_edge = constructor.factory(kind='Edges', name=name)

    inst_doc = Document(inst_edge)
    doc = inst_doc.delete_document(key)

    return True
예제 #7
0
def delete_document(name, key):
    """Get document from Database"""

    constructor = Constructor()
    inst_coll = constructor.factory(kind='Collection', name=name)

    inst_doc = Document(inst_coll)
    doc = inst_doc.delete_document(key)

    return True
예제 #8
0
    def test_delete_document_not_exist(self):
        """Test get document"""
        inst_doc = Document(self.db_inst.collection)

        with self.assertRaises(gmap_exceptions.DocumentNotExist):
            inst_doc.delete_document('doc04')
예제 #9
0
    def test_delete_document_not_exist(self):
        """Test get document"""
        inst_doc = Document(self.db_inst.collection)

        with self.assertRaises(gmap_exceptions.DocumentNotExist):
            inst_doc.delete_document('doc04')