Skip to content

Commit 7fba065

Browse files
committed
Rename archive_type to type
1 parent b546e31 commit 7fba065

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

temba_client/v2/tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def test_get_archives(self, mock_request):
178178
self.assertRequest(mock_request, "get", "archives")
179179
self.assertEqual(len(results), 4)
180180

181-
self.assertEqual(results[1].archive_type, "message")
181+
self.assertEqual(results[1].type, "message")
182182
self.assertEqual(results[1].start_date, datetime(2018, 4, 1, 0, 0, tzinfo=tzone.utc))
183183
self.assertEqual(results[1].period, "monthly")
184184
self.assertEqual(results[1].record_count, 10)
@@ -187,7 +187,7 @@ def test_get_archives(self, mock_request):
187187
self.assertEqual(results[1].download_url, "http://s3-bucket.aws.com/my/archive.jsonl.gz")
188188

189189
self.client.get_archives(
190-
archive_type="message",
190+
type="message",
191191
period="daily",
192192
after=datetime(2018, 1, 1, tzinfo=tzone.utc),
193193
before=datetime(2018, 5, 1, tzinfo=tzone.utc),
@@ -198,7 +198,7 @@ def test_get_archives(self, mock_request):
198198
"get",
199199
"archives",
200200
params={
201-
"archive_type": "message",
201+
"type": "message",
202202
"period": "daily",
203203
"after": "2018-01-01T00:00:00.000000Z",
204204
"before": "2018-05-01T00:00:00.000000Z",

temba_client/v2/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class FieldRef(TembaObject):
3030

3131

3232
class Archive(TembaObject):
33-
archive_type = SimpleField()
33+
type = SimpleField()
3434
start_date = DatetimeField()
3535
period = SimpleField()
3636
record_count = IntegerField()

test_files/v2/archives.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"previous": null,
44
"results": [
55
{
6-
"archive_type": "run",
6+
"type": "run",
77
"start_date": "2018-04-01",
88
"period": "monthly",
99
"record_count": 1,
@@ -12,7 +12,7 @@
1212
"download_url": "http://s3-bucket.aws.com/my/archive.jsonl.gz"
1313
},
1414
{
15-
"archive_type": "message",
15+
"type": "message",
1616
"start_date": "2018-04-01",
1717
"period": "monthly",
1818
"record_count": 10,
@@ -21,7 +21,7 @@
2121
"download_url": "http://s3-bucket.aws.com/my/archive.jsonl.gz"
2222
},
2323
{
24-
"archive_type": "message",
24+
"type": "message",
2525
"start_date": "2018-03-01",
2626
"period": "monthly",
2727
"record_count": 100,
@@ -30,7 +30,7 @@
3030
"download_url": "http://s3-bucket.aws.com/my/archive.jsonl.gz"
3131
},
3232
{
33-
"archive_type": "run",
33+
"type": "run",
3434
"start_date": "2018-03-01",
3535
"period": "monthly",
3636
"record_count": 1000,

0 commit comments

Comments
 (0)