Exemplo n.º 1
0
 def setUpClass(cls):
     config = {
         "DATA_SOURCE": paths.testDataRepo,
         "DEBUG": False
     }
     frontend.reset()
     frontend.configure(
         baseConfig="DevelopmentConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Exemplo n.º 2
0
    def setUpClass(cls):
        config = {
            "DATA_SOURCE": "simulated://",
            "SIMULATED_BACKEND_RANDOM_SEED": 1111,
            "SIMULATED_BACKEND_NUM_CALLS": 1,
            "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
            "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
            "LANDING_MESSAGE_HTML": paths.landingMessageHtml
            # "DEBUG" : True
        }
        frontend.reset()
        frontend.configure(baseConfig="TestConfig", extraConfig=config)
        cls.app = frontend.app.test_client()
        # silence usually unhelpful CORS log
        logging.getLogger('candig.frontend.cors').setLevel(logging.CRITICAL)

        # example test values
        cls.backend = frontend.app.backend
        cls.dataRepo = cls.backend.getDataRepository()
        cls.referenceSet = cls.dataRepo.getReferenceSets()[0]
        cls.referenceSetId = cls.referenceSet.getId()
        cls.reference = cls.referenceSet.getReferences()[0]
        cls.referenceId = cls.reference.getId()
        cls.dataset = cls.backend.getDataRepository().getDatasets()[0]
        cls.datasetId = cls.dataset.getId()
        cls.variantSet = cls.dataset.getVariantSets()[0]
        cls.variantSetId = cls.variantSet.getId()
        gaVariant = next(cls.variantSet.getVariants("1", 0, 2**32))
        cls.variantId = gaVariant.id
        cls.callSet = cls.variantSet.getCallSets()[0]
        cls.callSetId = cls.callSet.getId()
        cls.readGroupSet = cls.dataset.getReadGroupSets()[0]
        cls.readGroupSetId = cls.readGroupSet.getId()
        cls.readGroup = cls.readGroupSet.getReadGroups()[0]
        cls.readGroupId = cls.readGroup.getId()
        cls.readAlignment = next(cls.readGroup.getReadAlignments())
        cls.readAlignmentId = cls.readAlignment.id
        cls.phenotypeAssociationSet = \
            cls.dataset.getPhenotypeAssociationSets()[0]
        cls.phenotypeAssociationSetId = cls.phenotypeAssociationSet.getId()
        cls.association = cls.phenotypeAssociationSet.getAssociations()[0]
        cls.phenotype = cls.association.phenotype
        cls.phenotypeId = cls.phenotype.id
        cls.featureSets = cls.dataset.getFeatureSets()
        cls.genotypePhenotype = cls.phenotypeAssociationSet.getAssociations(
            request=None, featureSets=cls.featureSets)[0]
        cls.genotypePhenotypeId = cls.genotypePhenotype.id
        cls.rnaQuantificationSet = cls.dataset.getRnaQuantificationSets()[0]
        cls.rnaQuantificationSetId = cls.rnaQuantificationSet.getId()
        cls.rnaQuantification = cls.rnaQuantificationSet.getRnaQuantifications(
        )[0]
        cls.rnaQuantificationId = cls.rnaQuantification.getId()
        cls.expressionLevel = cls.rnaQuantification.getExpressionLevels(1,
                                                                        2)[0]
        cls.expressionLevelId = cls.expressionLevel.getId()
Exemplo n.º 3
0
 def setUpClass(cls):
     frontend.reset()
     frontend.configure(baseConfig="TestConfig")
     cls.app = frontend.app.test_client()
Exemplo n.º 4
0
 def setUpClass(cls):
     config = {"DATA_SOURCE": paths.testDataRepo, "DEBUG": False}
     logging.getLogger('candig.frontend.cors').setLevel(logging.CRITICAL)
     frontend.reset()
     frontend.configure(baseConfig="TestConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Exemplo n.º 5
0
 def setUpClass(cls):
     frontend.reset()
     frontend.configure(baseConfig="TestConfig")
     frontend.app.log_exception = mock.Mock()