'Test StaticContentStream stream_data function, asserts that we get all the bytes'

def test_static_content_stream_stream_data(self):

    data = SAMPLE_STRING
    item = FakeGridFsItem(data)
    static_content_stream = StaticContentStream('loc', 'name', 'type', item, length=item.length)
    total_length = 0
    stream = static_content_stream.stream_data()
    for chunck in stream:
        total_length += len(chunck)
    self.assertEqual(total_length, static_content_stream.length)
