Skip to content

Commit

Permalink
Fixing uber result parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Oct 16, 2024
1 parent 55ce1fd commit c5ab660
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions backend/tests/test_hotel.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def test_staffer_auth(mock_post, client):
]
}
]
mock_post.return_value.json = results.shift
results.reverse()
mock_post.return_value.json = results.pop
rv = client.post('/api/uber/west2024/login', json={"token": "234"})
assert(rv.status_code == 200)

Expand Down Expand Up @@ -199,7 +200,8 @@ def test_staffer_auth(mock_post, client):
]
}
]
mock_post.return_value.json = results.shift
results.reverse()
mock_post.return_value.json = results.pop
rv = client.post('/api/uber/west2024/login', json={"token": "123"})
assert(rv.status_code == 200)

Expand Down Expand Up @@ -272,7 +274,8 @@ def test_staffer_auth(mock_post, client):
]
}
]
mock_post.return_value.json = results.shift
results.reverse()
mock_post.return_value.json = results.pop
rv = client.post('/api/uber/west2024/login', json={"token": "456"})
assert(rv.status_code != 200)

Expand Down

0 comments on commit c5ab660

Please sign in to comment.