takahe/tests/users/services/test_domain.py
2023-07-24 17:59:50 -06:00

11 lines
262 B
Python

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