mirror of https://github.com/google/oss-fuzz.git
Fixing missing dash in datastore query (#4213)
This commit is contained in:
parent
eb19f16419
commit
5893c61c77
|
@ -32,7 +32,7 @@ MAX_BUILD_HISTORY_LENGTH = 64
|
|||
|
||||
def update_build_history(project_name, build_id, build_tag):
|
||||
"""Update build history of project."""
|
||||
project_key = ndb.Key(BuildsHistory, project_name + build_tag)
|
||||
project_key = ndb.Key(BuildsHistory, project_name + '-' + build_tag)
|
||||
project = project_key.get()
|
||||
|
||||
if not project:
|
||||
|
|
|
@ -82,7 +82,7 @@ class TestRequestBuilds(unittest.TestCase):
|
|||
build_tag='fuzzing',
|
||||
project='test-project',
|
||||
build_ids=[str(i) for i in range(1, 65)]).put()
|
||||
update_build_history('test-project', '65', '-fuzzing')
|
||||
update_build_history('test-project', '65', 'fuzzing')
|
||||
expected_build_ids = [str(i) for i in range(2, 66)]
|
||||
|
||||
self.assertEqual(BuildsHistory.query().get().build_ids,
|
||||
|
|
Loading…
Reference in New Issue