def test_abort_error_ensg_and_gene_symbol(self):
        app.config["TESTING"] = True
        self.app = app.test_client()

        with self.assertRaises(HTTPException) as http_error:
            # retrieve current API response to request
            self.assertEqual(
                geneInteraction.read_specific_interaction(
                    ensg_number=["ENSGfoobar"], gene_symbol=["foobar"]), 404)
    def test_abort_error_limit(self):
        app.config["TESTING"] = True
        self.app = app.test_client()

        with self.assertRaises(HTTPException) as http_error:
            # retrieve current API response to request
            self.assertEqual(
                geneInteraction.read_specific_interaction(
                    disease_name="foobar", limit=20000), 404)
    def test_abort_error_no_data(self):
        app.config["TESTING"] = True
        self.app = app.test_client()

        with self.assertRaises(HTTPException) as http_error:
            # retrieve current API response to request
            self.assertEqual(
                geneInteraction.read_specific_interaction(
                    disease_name="bladder urothelial carcinoma",
                    ensg_number=['ENSG00000023041']), 404)
    def test_findSpecific_disease_and_gene_symbol(self):
        app.config["TESTING"] = True
        self.app = app.test_client()

        # retrieve correct database response to request
        mock_response = test_read_specific_interaction(
            disease_name='bladder urothelial carcinoma',
            gene_symbol=['CALB2', 'TIGAR'],
            limit=50)

        # retrieve current API response to request
        api_response = geneInteraction.read_specific_interaction(
            disease_name='bladder urothelial carcinoma',
            gene_symbol=['CALB2', 'TIGAR'],
            limit=50)
        # assert that the two output the same
        self.assertEqual(mock_response, api_response)
    def test_findSpecific_disease_and_ensg(self):
        app.config["TESTING"] = True
        self.app = app.test_client()

        # retrieve correct database response to request
        mock_response = test_read_specific_interaction(
            disease_name='bladder urothelial carcinoma',
            ensg_number=['ENSG00000172137', 'ENSG00000078237'],
            limit=50)

        # retrieve current API response to request
        api_response = geneInteraction.read_specific_interaction(
            disease_name='bladder urothelial carcinoma',
            ensg_number=['ENSG00000172137', 'ENSG00000078237'],
            limit=50)
        # assert that the two output the same
        self.assertEqual(mock_response, api_response)