def delete_event(self, event_id): """Delete a event Arguments: event_id (str): The database key for the event """ logger.info("Deleting event{0}".format(event_id)) Event.objects(id=event_id).delete() logger.debug("Event {0} deleted".format(event_id))
def delete_event(self, event_id): """ Delete a event Arguments: event_id (str): The database key for the event """ self.logger.info("Deleting event{0}".format( event_id )) Event.objects(id=event_id).delete() self.logger.debug("Event {0} deleted".format( event_id ))
def has_comments(self): """ Return True is there are any comments for this variant in the database """ if Event.objects(verb='comment', variant_id=self.variant_id, institute=self.institute): return True return False
def test_add_mim(setup_database, get_institute, get_user, get_case): logger.info("Add OMIM term for a case") # Non existing mim phenotype mim_term = "MIM:614300" setup_database.add_phenotype( institute=get_institute, case=get_case, user=get_user, link="mimlink", omim_term=mim_term ) # Assert that the synopsis has been added to the case updated_case = Case.objects.get(case_id="acase") assert len(updated_case.phenotype_terms) != 0 # Check that the event not exists for event in Event.objects(verb="add_phenotype"): assert event.link == "mimlink" event.delete()