import pytest
from django.urls import reverse
from django.core.validators import ValidationError
import datetime
from documents.api import ep_client, createPadifNotExists


class TestEtherpad:
    def test(self):
        with ep_client() as (epc, group):
            if not epc:
                return
            pds = epc.listPads(groupID=str(group["groupID"]))
            assert isinstance(pds, dict)

    def test_listpads(self):
        pds = None
        with ep_client() as (epc, group):
            pds = epc.listPads(groupID=group["groupID"])
        assert isinstance(pds, dict)

    def test_padexists(self):
        assert createPadifNotExists("sdf")
