Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Apr 23, 2024
1 parent 3ffe654 commit 4996cc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_response(url, params=None, **kwargs):
elif url == "/im/infrastructures/infid/vms/0":
resp.ok = True
resp.status_code = 200
resp.text = ""
resp.text = "system front (cpu.count = 1 and memory.size = 512 MB)"
radl = {"class": "system",
"cpu.arch": "x86_64",
"cpu.count_min": 1,
Expand Down Expand Up @@ -328,12 +328,14 @@ def test_managevm_delete(self, flash, avatar, delete, user_data):
'success'))

@patch("app.utils.getUserAuthData")
@patch('requests.get')
@patch('requests.put')
@patch("app.utils.avatar")
@patch("app.flash")
def test_managevm_resize(self, flash, avatar, put, user_data):
def test_managevm_resize(self, flash, avatar, put, get, user_data):
user_data.return_value = "type = InfrastructureManager; token = access_token"
put.side_effect = self.put_response
get.side_effect = self.get_response
self.login(avatar)
params = {'cpu': '4',
'memory': '4',
Expand Down

0 comments on commit 4996cc5

Please sign in to comment.