takahe/tests/api/test_tokens.py

12 lines
263 B
Python
Raw Normal View History

2023-02-19 10:37:02 -08:00
import pytest
@pytest.mark.django_db
def test_has_scope(api_token):
"""
Tests has_scope on the Token model
"""
assert api_token.has_scope("read")
assert api_token.has_scope("read:statuses")
assert not api_token.has_scope("destroyearth")