'Verify that the messages have been logged to a file rather than to
stdout.'

def _assert_logfile_messages(self, stdout_messages, logfile):

    self.assertEqual([], stdout_messages)
    logfile_messages = map(loads, logfile.getContent().splitlines())
    assertContainsFields(self, logfile_messages[1], {u'key': 123})
