Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: client/tests/isolateserver_mock.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/tests/isolated_format_test.py ('k') | client/tests/isolateserver_smoke_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Swarming Authors. All rights reserved. 1 # Copyright 2014 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 that 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # can be found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import BaseHTTPServer 5 import BaseHTTPServer
6 import base64 6 import base64
7 import hashlib 7 import hashlib
8 import json 8 import json
9 import logging 9 import logging
10 import re 10 import re
11 import sys 11 import sys
12 import threading 12 import threading
13 import urllib2 13 import urllib2
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 zlib.compress(content)) 238 zlib.compress(content))
239 return h 239 return h
240 240
241 def add_content(self, namespace, content): 241 def add_content(self, namespace, content):
242 assert not self._server.discard_content 242 assert not self._server.discard_content
243 h = hash_content(content) 243 h = hash_content(content)
244 logging.info('add_content(%s, %s)', namespace, h) 244 logging.info('add_content(%s, %s)', namespace, h)
245 self._server.contents.setdefault(namespace, {})[h] = base64.b64encode( 245 self._server.contents.setdefault(namespace, {})[h] = base64.b64encode(
246 content) 246 content)
247 return h 247 return h
OLDNEW
« no previous file with comments | « client/tests/isolated_format_test.py ('k') | client/tests/isolateserver_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698