mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-10 17:31:03 +00:00
12 lines
263 B
Python
12 lines
263 B
Python
|
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")
|