Exemplo n.º 1
0
 def test_get(self):
     fields = {
         'uuid': '81c7ed5a-0c21-4485-af81-56a46921dff9',
     }
     self.model = Note.get(client=self.client, uuid=fields['uuid'])
     assert hasattr(self.model, 'uuid') and self.model.uuid == fields['uuid']
     assert hasattr(self.model, 'media_item_uuid') and self.model.media_item_uuid is not None
     assert hasattr(self.model, 'content') and self.model.content is not None
     assert hasattr(self.model, 'start_time') and self.model.start_time is not None
     assert hasattr(self.model, 'type') and self.model.type is not None
     assert hasattr(self.model, 'author') and self.model.author is not None and hasattr(self.author, 'uuid')
Exemplo n.º 2
0
    def test_init(self):
        fields = {
            'uuid': '81c7ed5a-0c21-4485-af81-56a46921dff9',
            'media_item_uuid': '81c7ed5a-0c21-4485-af81-56a46921dff9',
            'parent_uuid': '81c7ed5a-0c21-4485-af81-56a46921dff9',
        }
        self.model = Note(fields=fields)

        assert hasattr(self.model, 'uuid')
        assert self.model.uuid == fields['uuid']
        assert self.model.media_item_uuid == fields['media_item_uuid']
        assert self.model.parent_uuid == fields['parent_uuid']
Exemplo n.º 3
0
 def test_get(self):
     fields = {
         'uuid': '81c7ed5a-0c21-4485-af81-56a46921dff9',
     }
     self.model = Note.get(client=self.client, uuid=fields['uuid'])
     assert hasattr(self.model,
                    'uuid') and self.model.uuid == fields['uuid']
     assert hasattr(
         self.model,
         'media_item_uuid') and self.model.media_item_uuid is not None
     assert hasattr(self.model,
                    'content') and self.model.content is not None
     assert hasattr(self.model,
                    'start_time') and self.model.start_time is not None
     assert hasattr(self.model, 'type') and self.model.type is not None
     assert hasattr(self.model,
                    'author') and self.model.author is not None and hasattr(
                        self.author, 'uuid')
Exemplo n.º 4
0
 def test_get_all(self):
     self.models = Note.get_all(client=self.client)
     assert len(self.models) > 0
     assert hasattr(self.models[0], 'content')
     assert hasattr(self.models[0], 'uuid')
Exemplo n.º 5
0
 def test_get_all(self):
     self.models = Note.get_all(client=self.client)
     assert len(self.models) > 0
     assert hasattr(self.models[0], 'content')
     assert hasattr(self.models[0], 'uuid')