summaryrefslogtreecommitdiff
path: root/nova/db
diff options
context:
space:
mode:
authorTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2019-08-19 18:11:48 +0900
committerEric Fried <openstack@fried.cc>2019-08-19 09:43:10 -0500
commit1eec451b1ba254ec4c43c77f79b0d2809d6cb9a5 (patch)
tree98ffc8abaffaedb2828b6f936428a02ca57a6963 /nova/db
parent8ea5e373381fc4152d2914742ef42a75acbbcc53 (diff)
downloadnova-1eec451b1ba254ec4c43c77f79b0d2809d6cb9a5.tar.gz
Tests: autospecs all the mock.patch usages
By default, mock.patch's autospec argument is None, meaning that there's no signature checking for the patched methods and functions. oslotest.mock_fixture.patch_mock_module fixes a few issues within mock.patch functions, as well as setting autospec=True by default, unless otherwise specified or new_callable, create, spec arguments are passed in. Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com> Change-Id: I4484e63c97bd1cdde3d88855eabe7545784f365e Closes-Bug: #1735588
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 0925c83a74..8f9bb3cec2 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -5818,7 +5818,7 @@ def instance_tag_set(context, instance_uuid, tags):
if to_add:
data = [
{'resource_id': instance_uuid, 'tag': tag} for tag in to_add]
- context.session.execute(models.Tag.__table__.insert(), data)
+ context.session.execute(models.Tag.__table__.insert(None), data)
return context.session.query(models.Tag).filter_by(
resource_id=instance_uuid).all()