takahe/tests/users/services/test_domain.py

12 lines
262 B
Python
Raw Normal View History

import pytest
from users.models import Domain
from users.services import DomainService
@pytest.mark.django_db
def test_block():
DomainService.block(["block1.example.com", "block2.example.com"])
assert Domain.objects.filter(blocked=True).count() == 2