def test_reform_filters_full(self): ''' Test if filters are classified correctly as pre and post ''' self.assertEqual( BaseModel.reform_filters_for_pandas( ['post-eq-a-1', 'and', 'in-b-2-3', 'and', 'post-nn-c', 'or', 'eq-d-4'] ), ( ['in-b-2-3', 'and', 'eq-d-4'], [['post', 'eq', 'a', '1'], 'and', ['post', 'nn', 'c']] ) )
def test_reform_filters_no_filter(self): ''' Test if None is returned if no filter is sent to the method ''' self.assertEqual( BaseModel.reform_filters_for_pandas(None), (None, None) )