Skip to content

Commit

Permalink
Add save mock
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Jun 11, 2024
1 parent c1ba627 commit 94c74d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions magnum_cluster_api/tests/functional/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

import pytest
from magnum import objects as magnum_objects # type: ignore
from magnum.objects import fields # type: ignore
Expand Down Expand Up @@ -76,6 +78,7 @@ def _create_node_group(self, context, driver, node_group_name, cluster_template)
status=fields.ClusterStatus.CREATE_IN_PROGRESS,
)
new_node_group.name = node_group_name
new_node_group.save = mock.MagicMock()

self.cluster.status = fields.ClusterStatus.UPDATE_IN_PROGRESS
driver.create_nodegroup(context, self.cluster, new_node_group)
Expand Down

0 comments on commit 94c74d1

Please sign in to comment.