def test_tag_fpi(self, mock_requests, mock_oauth): system_id = "node-01" fpi_tag = "use-fastpath-installer" with patch("maasclient.MaasClient.tag_new") as mock_tag_new: with patch("maasclient.MaasClient.tag_machine") as mock_tag_mach: c = MaasClient(self.mock_auth) c.tag_fpi(json.loads(ONE_MACHINE_JSON_NOTAGS)) mock_tag_new.assert_called_once_with(fpi_tag) mock_tag_mach.assert_called_once_with(fpi_tag, system_id)
def test_tag_fpi(self, mock_requests, mock_oauth): system_id = "node-01" fpi_tag = 'use-fastpath-installer' with patch('maasclient.MaasClient.tag_new') as mock_tag_new: with patch('maasclient.MaasClient.tag_machine') as mock_tag_mach: c = MaasClient(self.mock_auth) c.tag_fpi(json.loads(ONE_MACHINE_JSON_NOTAGS)) mock_tag_new.assert_called_once_with(fpi_tag) mock_tag_mach.assert_called_once_with(fpi_tag, system_id)