def classify(results, dt_instrument_class):
    for result in results:
        luaction = dt.classify(dt_instrument_class, result)
        result['class_code'] = ''.join(luaction[k] for k in luaction.keys())
 def test_case_9(self):
     facts = {'cond_1': 'qaz', 'cond_2': 99, 'cond_3': 5}
     self.assertEqual(dt.classify(self.dt_ref_dt, facts), {
         'action_1': 'numbers compare 5',
         'action_2': 'row9'
     })
 def test_case_99(self):
     facts = {'cond_1': 'pass trhu', 'cond_2': 'abc', 'cond_3': 'hijk'}
     self.assertEqual(dt.classify(self.dt_ref_dt, facts), {
         'action_1': 'U',
         'action_2': 'U'
     })
 def test_case_8(self):
     facts = {'cond_1': 'qaz', 'cond_2': 2, 'cond_3': 'wer'}
     self.assertEqual(dt.classify(self.dt_ref_dt, facts), {
         'action_1': 'numbers compare 4',
         'action_2': 'row8'
     })
 def test_case_6(self):
     facts = {'cond_1': 'abc', 'cond_2': 12, 'cond_3': 18}
     self.assertEqual(dt.classify(self.dt_ref_dt, facts), {
         'action_1': 'numbers compare 2',
         'action_2': 'row6'
     })
 def test_case_4(self):
     facts = {'cond_1': 2, 'cond_2': 3, 'cond_3': 4}
     self.assertEqual(dt.classify(self.dt_ref_dt, facts), {
         'action_1': 'all numbers eq',
         'action_2': 'row4'
     })
 def test_case_3(self):
     facts = {'cond_1': 'def', 'cond_2': 2, 'cond_3': 3}
     self.assertEqual(dt.classify(self.dt_ref_dt, facts), {
         'action_1': 'numeric equal',
         'action_2': 'row3'
     })
 def test_case_2(self):
     facts = {'cond_1': 'def', 'cond_2': 'abc', 'cond_3': 'hijk'}
     self.assertEqual(dt.classify(self.dt_ref_dt, facts), {
         'action_1': 'all_text 2 condtions',
         'action_2': 'row2'
     })