Ejemplo n.º 1
0
 def test_part_2_lookup_pharm_classes_warfarin(self):
     # TODO: Complete test by adding call to method to look up pharm classes for warfarin
     endpoint = Endpoint("mock")
     pharm_classes = endpoint.get_pharm_class("warfarin")
     expected_mappings = {
         'EPC': ['Vitamin K Antagonist'],
         'MoA': ['Vitamin K Inhibitors']
     }
     self.assertDictEqual(pharm_classes, expected_mappings)
Ejemplo n.º 2
0
    def test_part_2_lookup_pharm_classes_aspirin(self):
        # TODO: Complete test by adding call to method to look up pharm classes for aspirin
        endpoint = Endpoint("mock")
        pharm_classes = endpoint.get_pharm_class("aspirin")
        expected_mappings = {
            'Chemical/Ingredient':
            ['Nonsteroidal Anti-inflammatory Compounds'],
            'PE': [
                'Decreased Prostaglandin Production',
                'Decreased Platelet Aggregation'
            ],
            'EPC': [
                'Nonsteroidal Anti-inflammatory Drug',
                'Platelet Aggregation Inhibitor'
            ],
            'MoA': ['Cyclooxygenase Inhibitors']
        }

        self.assertDictEqual(pharm_classes, expected_mappings)
Ejemplo n.º 3
0
 def test_get_pharm_class(self):
     endpoint = Endpoint("fda")
     pharm_class = endpoint.get_pharm_class("warfarin")
     print pharm_class