def test_mapper_current_workflow(self, *args, **kwargs): mapper = Mapper(self.sample_rules, 'http://localhost:8000') mapping = mapper.map(self.message) self.assert_(self.sample_rules[0]['conditions']['subject'][0]\ in mapping[1]['conditions']['subject'], mapping[1]['conditions']['subject'])
def test_mapper_desired_workflow(self, *args, **kwargs): sample_rules_2 = self.sample_rules sample_rules_2[0]['conditions']['subject'][0] =\ '\[AVAILABLE FOR TRANSLATION\]*' mapper = Mapper(sample_rules_2, 'http://localhost:8000') mapping = mapper.map(self.message) self.assert_(self.sample_rules[0]['conditions']['subject'][0]\ in mapping[1]['conditions']['subject'], mapping[1]['conditions']['subject'])
def test_message_id(self, *args, **kwargs): mapper = Mapper(self.sample_rules, 'http://localhost:8000') mapping = mapper.map(self.message) assert 'Message-ID' in mapping[1]['msg_params']