'A request for old messages with a narrow by sender only returns
messages sent by that person.'

def test_get_messages_with_narrow_sender(self):

    self.login(self.example_email('hamlet'))
    self.send_message(self.example_email('hamlet'), 'Scotland', Recipient.STREAM)
    self.send_message(self.example_email('othello'), 'Scotland', Recipient.STREAM)
    self.send_message(self.example_email('othello'), self.example_email('hamlet'), Recipient.PERSONAL)
    self.send_message(self.example_email('iago'), 'Scotland', Recipient.STREAM)
    narrow = [dict(operator='sender', operand=self.example_email('othello'))]
    result = self.get_and_check_messages(dict(narrow=ujson.dumps(narrow)))
    for message in result['messages']:
        self.assertEqual(message['sender_email'], self.example_email('othello'))
