MCPcopy
hub / github.com/photonixapp/photonix / test_get_photos

Method test_get_photos

tests/test_graphql.py:93–110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

91 assert data['data']['photo']['url'].startswith('/thumbnails')
92
93 def test_get_photos(self):
94 # self.api_client.set_user(self.defaults['user'])
95 query = """
96 {
97 allPhotos {
98 edges {
99 node {
100 url
101 }
102 }
103 }
104 }
105 """
106 response = self.api_client.post_graphql(query, {'id': str(self.defaults['snow_photo'].id)})
107 assert response.status_code == 200
108 data = get_graphql_content(response)
109 assert len(data['data']['allPhotos']['edges']) == 2
110 assert data['data']['allPhotos']['edges'][0]['node']['url'].startswith('/thumbnails')
111
112 def test_filter_photos(self):
113 tree_tag, _ = Tag.objects.get_or_create(library=self.defaults['library'], name='Tree', type='O')

Callers

nothing calls this directly

Calls 2

get_graphql_contentFunction · 0.85
post_graphqlMethod · 0.80

Tested by

no test coverage detected