To check whether a valid license file is available, run
from the command line. This command will return an error if the license file is not set up correctly. Please see How do I test my Gurobi license? for more information and solution ideas for possible errors.
If you want to test for a valid license file programmatically, attempt to create a model (e.g., construct a Model object in Python). This will fail if a valid license file is not available.