-
Hello, I'm currently working on a Terraform provider for Weblate to provision teams, projects, etc. This works fine so far. No I want to add tests for the Terraform resources. This usually works by spinning up a Docker container of the application (Weblate in this case) and then execute the tests against the API. The problem here is that I can only authenticate against the API with an access token and I haven't found a way yet to obtain one programmatically for the The ugly workaround I'm using today is to use a database dump with a known token when starting Weblate with Any ideas on how to use Weblate in this scenario? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not really elegant, but we use following in some automations: weblate shell -c 'from weblate.auth.models import User; user = User.objects.create(username="monitor"); print(user.auth_token.key)' |
Beta Was this translation helpful? Give feedback.
Not really elegant, but we use following in some automations:
weblate shell -c 'from weblate.auth.models import User; user = User.objects.create(username="monitor"); print(user.auth_token.key)'