Example #1
0
 def __new__(cls, **data):
     check.is_dict(
         data,
         value_type=(str, float, int, bool),
         desc="Record fields must be one of types: (str, float, int, bool)",
     )
     return super(TableRecord, cls).__new__(cls, data=data)
Example #2
0
def test_is_dict(kwargs, should_succeed):
    if should_succeed:
        assert check.is_dict(**kwargs) == kwargs["obj"]
    else:
        with pytest.raises(CheckError):
            check.is_dict(**kwargs)
Example #3
0
 def start_sync(self, connection_id: str) -> dict:
     return check.is_dict(
         self.make_request(endpoint="/connections/sync", data={"connectionId": connection_id})
     )
Example #4
0
 def get_job_status(self, job_id: int) -> dict:
     return check.is_dict(self.make_request(endpoint="/jobs/get", data={"id": job_id}))
Example #5
0
 def get_connection_details(self, connection_id: str) -> dict:
     return check.is_dict(
         self.make_request(endpoint="/connections/get", data={"connectionId": connection_id})
     )