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')
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')
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
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
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
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
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')