示例#1
0
    def test_gene_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = self.gene_json
        target = Target(self.target_json)

        self.assertEqual(len(target.genes()), 3)
        self.assertIsInstance(target.genes()[0], Gene)
        self.assertIsInstance(target.genes()[1], Gene)
        self.assertIsInstance(target.genes()[2], Gene)
        self.assertEqual(target.genes()[0].gene_symbol(), "KCNMA1")
        self.assertEqual(target.genes()[1].gene_symbol(), "Kcnma1")
        self.assertEqual(target.genes()[2].gene_symbol(), "Kcnma2")
示例#2
0
    def test_gene_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = self.gene_json
        target = Target(self.target_json)

        self.assertEqual(len(target.genes()), 3)
        self.assertIsInstance(target.genes()[0], Gene)
        self.assertIsInstance(target.genes()[1], Gene)
        self.assertIsInstance(target.genes()[2], Gene)
        self.assertEqual(target.genes()[0].gene_symbol(), "KCNMA1")
        self.assertEqual(target.genes()[1].gene_symbol(), "Kcnma1")
        self.assertEqual(target.genes()[2].gene_symbol(), "Kcnma2")
示例#3
0
    def test_species_gene_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = self.gene_json
        target = Target(self.target_json)

        genes = target.genes(species="mouse")
        self.assertEqual(len(genes), 1)
        self.assertIsInstance(genes[0], Gene)
        self.assertEqual(genes[0].gene_symbol(), "Kcnma1")
        self.assertEqual(genes[0].species(), "Mouse")
示例#4
0
    def test_species_gene_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = self.gene_json
        target = Target(self.target_json)

        genes = target.genes(species="mouse")
        self.assertEqual(len(genes), 1)
        self.assertIsInstance(genes[0], Gene)
        self.assertEqual(genes[0].gene_symbol(), "Kcnma1")
        self.assertEqual(genes[0].species(), "Mouse")
示例#5
0
    def test_gene_properties_when_no_json(self, mock_json_retriever):
        mock_json_retriever.return_value = None
        target = Target(self.target_json)

        self.assertEqual(target.genes(), [])
示例#6
0
    def test_gene_properties_when_no_json(self, mock_json_retriever):
        mock_json_retriever.return_value = None
        target = Target(self.target_json)

        self.assertEqual(target.genes(), [])