added tests for cdx_snapshot.py at tests/test_cdx_snapshot.py

This commit is contained in:
Akash Mahanty
2022-01-24 16:29:44 +05:30
parent 57512c65ff
commit cd8a32ed1f
2 changed files with 49 additions and 0 deletions

View File

@@ -2,6 +2,14 @@ from datetime import datetime
class CDXSnapshot:
"""
Class for the CDX snapshot lines returned by the CDX API,
Each valid line of the CDX API is casted to an CDXSnapshot object
by the CDX API interface.
This provides the end-user the ease of using the data as attributes
of the CDXSnapshot.
"""
def __init__(self, properties):
self.urlkey = properties["urlkey"]
self.timestamp = properties["timestamp"]