forkeado de spla/fediverse
15 líneas
470 B
Python
15 líneas
470 B
Python
from federation import Database
|
|
|
|
def test__database_connection():
|
|
db = Database(config_file='config/test_db_config.txt', fediverse_db_host='localhost', fediverse_db_port='5432')
|
|
|
|
# noexcept
|
|
db.check_connection()
|
|
|
|
|
|
def test__database_connection__noservers():
|
|
db = Database(config_file='config/test_db_config.txt', fediverse_db_host='localhost', fediverse_db_port='5432')
|
|
|
|
checked_server = db.get_last_checked_servers()
|
|
|
|
assert checked_server == [] |