MCPcopy Create free account
hub / github.com/airbnb/binaryalert / test_apply

Method test_apply

tests/cli/manager_test.py:48–55  ·  view source on GitHub ↗

Validate order of Terraform operations.

(self, mock_subprocess: mock.MagicMock)

Source from the content-addressed store, hash-verified

46
47 @mock.patch.object(subprocess, 'check_call')
48 def test_apply(self, mock_subprocess: mock.MagicMock):
49 """Validate order of Terraform operations."""
50 self.manager.apply()
51 mock_subprocess.assert_has_calls([
52 mock.call(['terraform', 'init']),
53 mock.call(['terraform', 'fmt']),
54 mock.call(['terraform', 'apply', '-auto-approve=false'])
55 ])
56
57 @mock.patch.object(manager_module, 'lambda_build')
58 def test_build(self, mock_build: mock.MagicMock):

Callers

nothing calls this directly

Calls 1

applyMethod · 0.80

Tested by

no test coverage detected