cgpt: Fix unit tests

After commit c94b7f98b93c ("cgpt: Enable images to be built with
auto detected block sizes."), a number of elements were rearranged
in cgpt to support working with 4k block size devices. This included
removing the 'blocks' attribute of a partition, and specifying
partitions only in terms of bytes. This broke the unit tests.
Fix that up so that it makes sense again.

Also fix up the linter errors when I try to upload.

BUG=chromium:832160
TEST=run ./cgpt_unittests.py, experience joy

Change-Id: I4f52dd1de6076ca4bf8e14b2a75fd0793a5bb387
Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1666413
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed