File: test_resource.py

package info (click to toggle)
pychurchtools 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 408 kB
  • sloc: python: 2,060; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 506 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from __future__ import annotations

from tests import get_ct_client


class TestResources:
    appointment_id = 0

    @classmethod
    def setup_class(cls):
        cls.ct = get_ct_client()
        cls.resource_types, cls.resources = cls.ct.resources.masterdata()

    def test_masterdata(self):
        assert self.ct.resources.masterdata()

    def test_bookings(self):
        ids = [r.id for r in self.resources]
        # self.ct.set_debugging_level(2)
        assert self.ct.resources.bookings(ids)