• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

chift-oneapi / chift-python-sdk / 8056071285

26 Feb 2024 09:41PM UTC coverage: 98.651%. Remained the same
8056071285

push

github

hhertoghe
Update to POS model

3145 of 3188 relevant lines covered (98.65%)

0.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.95
/chift/models/consumers/data/__init__.py
1
from typing import ClassVar
1✔
2

3
from chift.api.mixins import CreateMixin, DeleteMixin, ListMixin, UpdateMixin
1✔
4
from chift.openapi.models import Data as DataModel
1✔
5

6

7
class Data(
1✔
8
    ListMixin[DataModel],
9
    CreateMixin[DataModel],
10
    UpdateMixin[DataModel],
11
    DeleteMixin,
12
):
13
    chift_vertical: ClassVar = "datastore"
1✔
14
    chift_model: ClassVar = ""
1✔
15
    model = DataModel
1✔
16

17
    def get(self, datastore_id, params=None, client=None) -> DataModel:
1✔
18
        self.extra_path = f"{datastore_id}/data"
×
19
        return super().all(params=params, client=client)
×
20

21
    def create(self, datastore_id, data, client=None, params=None) -> list[DataModel]:
1✔
22
        self.extra_path = f"{datastore_id}/data"
1✔
23
        return [
1✔
24
            DataModel(**item)
25
            for item in super().create(
26
                data, map_model=False, client=client, params=params
27
            )
28
        ]
29

30
    def update(
1✔
31
        self, datastore_id, datastoredata_id, data, client=None, params=None
32
    ) -> DataModel:
33
        self.extra_path = f"{datastore_id}/data/{datastoredata_id}"
1✔
34
        return super().update(None, data, client=client, params=params)
1✔
35

36
    def delete(self, datastore_id, datastoredata_id, client=None, params=None):
1✔
37
        self.extra_path = f"{datastore_id}/data/{datastoredata_id}"
×
38
        return super().delete(None, client=client, params=params)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc