'When given a line that has JSON substructures,
extract_eliot_from_twisted_log returns the bytes that were logged by
Eliot.'

def test_line_with_substructure(self):

    logged_line = '{"timestamp":    1449835188.575052,    "task_uuid":    "6c579710-1b95-4604-b5a1-36b56f8ceb53",    "message_type":    "foo",    "name":    "qux",    "subobj":    {"a":    "cat"},"task_level":    [1]}    \n'
    expected = '{"timestamp":    1449835188.575052,    "task_uuid":    "6c579710-1b95-4604-b5a1-36b56f8ceb53",    "message_type":    "foo",    "name":    "qux",    "subobj":    {"a":    "cat"},"task_level":    [1]}'
    self.assertThat(extract_eliot_from_twisted_log(logged_line), Equals(expected))
