mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 15:42:10 +03:00
28 lines
897 B
Python
28 lines
897 B
Python
import pytest
|
|
|
|
from deltachat import const
|
|
from deltachat import provider
|
|
|
|
|
|
def test_provider_info_from_email():
|
|
example = provider.Provider.from_email("email@example.com")
|
|
assert example.overview_page == "https://providers.delta.chat/example.com"
|
|
assert example.name == "Example"
|
|
assert example.markdown == "\n..."
|
|
assert example.status_date == "2018-09"
|
|
assert example.status == "PREPARATION"
|
|
|
|
|
|
def test_provider_info_from_domain():
|
|
example = provider.Provider("example.com")
|
|
assert example.overview_page == "https://providers.delta.chat/example.com"
|
|
assert example.name == "Example"
|
|
assert example.markdown == "\n..."
|
|
assert example.status_date == "2018-09"
|
|
assert example.status == "PREPARATION"
|
|
|
|
|
|
def test_provider_info_none():
|
|
with pytest.raises(provider.ProviderNotFoundError):
|
|
provider.Provider.from_email("email@unexistent.no")
|