Fix test and LGTM warnings.
- Fixes LGTM warnings for an unused import and equality comparisons to None in SQLAlchemy filters. - Removes part of a unit test asserting that the claimed_until locking mechanism works correctly. If I recall correctly, this does not work in unit tests because the test takes place inside a transaction, and the database provider does evaluate the current time until the transaction is written.
This commit is contained in:
@@ -206,7 +206,7 @@ def test_get_applications_pending_creation():
|
||||
portfolio1 = PortfolioFactory.create(state="COMPLETED")
|
||||
app_ready = ApplicationFactory.create(portfolio=portfolio1)
|
||||
|
||||
app_claimed = ApplicationFactory.create(portfolio=portfolio1, claimed_until=later)
|
||||
app_done = ApplicationFactory.create(portfolio=portfolio1, cloud_id="123456")
|
||||
|
||||
portfolio2 = PortfolioFactory.create(state="UNSTARTED")
|
||||
app_not_ready = ApplicationFactory.create(portfolio=portfolio2)
|
||||
|
Reference in New Issue
Block a user