Skip to content

Commit d1cc207

Browse files
committed
conftest.py: Added sample_bulk_conversation fixture + convo file.
1 parent dbfd966 commit d1cc207

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed

tests/integration/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import os
23
import re
34
import time
@@ -191,6 +192,17 @@ def sample_video() -> str:
191192
return path_to_video
192193

193194

195+
@pytest.fixture
196+
def sample_bulk_conversation() -> list:
197+
path_to_conversation = 'tests/integration/media/bulk_conversation.json'
198+
assert os.path.exists(path_to_conversation)
199+
# return path_to_conversation
200+
201+
with open(path_to_conversation) as json_file:
202+
conversations = json.load(json_file)
203+
return conversations
204+
205+
194206
@pytest.fixture
195207
def organization(client):
196208
# Must have at least one seat open in your org to run these tests
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
[
2+
{
3+
"externalId": "Convo-123",
4+
"attachments": [
5+
{
6+
"type": "TEXT",
7+
"value": "IOWA, Zone 2232, June 2022 [Text string]"
8+
},
9+
{
10+
"type": "IMAGE",
11+
"value": "https://storage.googleapis.com/labelbox-sample-datasets/Docs/disease_attachment.jpeg"
12+
}
13+
],
14+
"type": "application/vnd.labelbox.conversational",
15+
"version": 1,
16+
"conversationalData": [
17+
{
18+
"messageId": "message-0",
19+
"timestampUsec": 1530718491,
20+
"content": "I love iphone! i just bought new iphone! :smiling_face_with_3_hearts: :calling:",
21+
"user": {
22+
"userId": "Bot 002",
23+
"name": "Bot"
24+
},
25+
"align": "left",
26+
"canLabel": false
27+
},
28+
{
29+
"messageId": "message-1",
30+
"timestampUsec": 1530718503,
31+
"content": "Thats good for you, i'm not very into new tech",
32+
"user": {
33+
"userId": "User 00686",
34+
"name": "User"
35+
},
36+
"align": "right",
37+
"canLabel": true
38+
},
39+
{
40+
"messageId": "message-2",
41+
"timestampUsec": 1530718516,
42+
"content": "I am a college student and i am a college student :female-teacher::skin-tone-2:",
43+
"user": {
44+
"userId": "Bot 002",
45+
"name": "Bot"
46+
},
47+
"align": "left",
48+
"canLabel": false
49+
},
50+
{
51+
"messageId": "message-3",
52+
"timestampUsec": 1530718528,
53+
"content": "I am go to gym and live on donations :woman-lifting-weights::skin-tone-6:",
54+
"user": {
55+
"userId": "User 00686",
56+
"name": "User"
57+
},
58+
"align": "right",
59+
"canLabel": true
60+
}
61+
]
62+
},
63+
{
64+
"externalId": "Convo-456",
65+
"attachments": [
66+
{
67+
"type": "TEXT",
68+
"value": "IOWA, Zone 1234567, July 2022 [Text string]"
69+
},
70+
{
71+
"type": "IMAGE",
72+
"value": "https://storage.googleapis.com/labelbox-sample-datasets/Docs/disease_attachment.jpeg"
73+
}
74+
],
75+
"type": "application/vnd.labelbox.conversational",
76+
"version": 1,
77+
"conversationalData": [
78+
{
79+
"messageId": "message-0",
80+
"timestampUsec": 1530718491,
81+
"content": "I love iphone! i just bought new iphone! :smiling_face_with_3_hearts: :calling:",
82+
"user": {
83+
"userId": "Bot 002",
84+
"name": "Bot"
85+
},
86+
"align": "left",
87+
"canLabel": false
88+
},
89+
{
90+
"messageId": "message-1",
91+
"timestampUsec": 1530718503,
92+
"content": "Thats good for you, i'm not very into new tech",
93+
"user": {
94+
"userId": "User 00686",
95+
"name": "User"
96+
},
97+
"align": "right",
98+
"canLabel": true
99+
},
100+
{
101+
"messageId": "message-2",
102+
"timestampUsec": 1530718516,
103+
"content": "I am a college student and i am a college student :female-teacher::skin-tone-2:",
104+
"user": {
105+
"userId": "Bot 002",
106+
"name": "Bot"
107+
},
108+
"align": "left",
109+
"canLabel": false
110+
}
111+
]
112+
}
113+
]

0 commit comments

Comments
 (0)