diff options
author | Gilad Arnold <garnold@chromium.org> | 2013-04-02 16:24:41 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-05-22 19:15:56 -0700 |
commit | 18f4f9fab192e75a3477979c03a89381c35fd974 (patch) | |
tree | 7179808d6448dffaa0f196fe90c5a774dd2e5652 /scripts/update_payload/test_utils.py | |
parent | 9b90c93edcaa16f6c734f421ccf00201a474d9ea (diff) |
paycheck: move stuff from checker_unittest.py to test_utils.py
This is all stuff that'll come in handy when testing other modules.
BUG=chromium:217039,chromium:215780,chromium:189855
TEST=Passes unittests
Change-Id: I57d1fae97330f22748885f8028352f07b5058396
Reviewed-on: https://gerrit.chromium.org/gerrit/47615
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Diffstat (limited to 'scripts/update_payload/test_utils.py')
-rw-r--r-- | scripts/update_payload/test_utils.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/update_payload/test_utils.py b/scripts/update_payload/test_utils.py index d05aafd1..6d455d52 100644 --- a/scripts/update_payload/test_utils.py +++ b/scripts/update_payload/test_utils.py @@ -18,6 +18,23 @@ class TestError(Exception): """An error during testing of update payload code.""" +# Private/public RSA keys used for testing. +_PRIVKEY_FILE_NAME = 'payload-test-key.pem' +_PUBKEY_FILE_NAME = 'payload-test-key.pub' + + +def KiB(count): + return count << 10 + + +def MiB(count): + return count << 20 + + +def GiB(count): + return count << 30 + + def _WriteInt(file_obj, size, is_unsigned, val): """Writes a binary-encoded integer to a file. |