To check whether a valid license file is available, run
from the command line. If the license file is not set up correctly, this command will return an error. Please see these references:
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.