Deleted token line in api.py and added test for token generator