def METHOD_NAME(self):
    num_parts = 50000
    common_args = dict(mode='w', project=self.proj_id)
    with dxpy.new_dxfile(write_buffer_size=280000, expected_file_size=300000*num_parts, **common_args) as myfile:
        myfile.write("0" * 700000)
    myfile.close(block=True)
    parts = myfile.describe(fields={"parts": True})['parts']
    self.assertEquals(parts['1']['size'], 300000)
    with dxpy.new_dxfile(write_buffer_size=320000, expected_file_size=300000*num_parts, **common_args) as myfile:
        myfile.write("0" * 700000)
    myfile.close(block=True)
    parts = myfile.describe(fields={"parts": True})['parts']
    self.assertEquals(parts['1']['size'], 320000)