def test_delete_status(db): assert users.add_user( ("test1", "*****@*****.**", "tester", "one"), db) is True assert user_status.add_status( ["test1_status_id", "test1", "test status text"], db) is True assert user_status.delete_status("test1_status_id", db) is True assert user_status.delete_status("test1_status_id", db) is False assert user_status.delete_status("other_status_id", db) is False
def test_delete_status(status): ''' Test each aspect of delete_status ''' # Refuse to delete a non existant status assert not user_status.delete_status(status[0]) user_status.add_status(*status) # Sucessfully delete a status assert user_status.delete_status(status[0])
def delete_status(status_id, db): ''' Requirements: - Returns False if there are any errors (such as status_id not found) - Otherwise, it returns True. ''' return user_status.delete_status(status_id, db)
def delete_status(status_id): ''' Deletes a status_id from the database Requirements: - Returns False if there are any errors (such as status_id not found) - Otherwise, it returns True. ''' logger.info('Deleting an UserStatus') return user_status.delete_status(status_id)