From 4b18c3c301d5d35183fe2ac5a14923852533effd Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Tue, 9 Oct 2018 15:21:14 -0400 Subject: [PATCH 01/14] Initial code for APIProxy We can now use the securedrop-proxy to fetch data from the server. This has the initial authentication and get_source* methods. --- sdclientapi/__init__.py | 166 ++-------------------------------- sdclientapi/proxiapi.py | 155 +++++++++++++++++++++++++++++++ sdclientapi/sdlocalobjects.py | 157 ++++++++++++++++++++++++++++++++ 3 files changed, 318 insertions(+), 160 deletions(-) create mode 100644 sdclientapi/proxiapi.py create mode 100644 sdclientapi/sdlocalobjects.py diff --git a/sdclientapi/__init__.py b/sdclientapi/__init__.py index b020ad1b9..e52e5e4c5 100644 --- a/sdclientapi/__init__.py +++ b/sdclientapi/__init__.py @@ -5,164 +5,8 @@ from typing import Optional, Dict, List, Tuple - -class BaseError(Exception): - pass - - -class ReplyError(BaseError): - "For errors on reply messages" - - def __init__(self, message): - self.msg = message - - def __str__(self): - return repr(self.msg) - - -class WrongUUIDError(BaseError): - "For missing UUID, can be for source or submission" - - def __init__(self, message): - self.msg = message - - def __str__(self): - return repr(self.msg) - - -class AuthError(BaseError): - "For Authentication errors" - - def __init__(self, message): - self.msg = message - - def __str__(self): - return repr(self.msg) - - -class AttributeError(BaseError): - def __init__(self, message): - self.msg = message - - def __str__(self): - return repr(self.msg) - - -class Reply: - """ - This class represents a reply to the source. - """ - - def __init__(self, **kwargs) -> None: - self.filename = "" # type: str - self.journalist_username = "" # type: str - self.journalist_uuid = "" # type: str - self.is_deleted_by_source = False # type: bool - self.reply_url = "" # type: str - self.size = 0 # type: int - self.source_url = "" # type: str - self.source_uuid = "" # type: str - self.uuid = "" # type: str - - for key in [ - "filename", - "journalist_username", - "journalist_uuid", - "is_deleted_by_source", - "reply_url", - "size", - "source_url", - "uuid", - ]: - if not key in kwargs: - AttributeError("Missing key {}".format(key)) - setattr(self, key, kwargs[key]) - - # Now let us set source uuid - values = self.source_url.split("/") - self.source_uuid = values[-1] - - -class Submission: - """ - This class represents a submission object in the server. - """ - - def __init__(self, **kwargs) -> None: - self.download_url = "" # type: str - self.filename = "" # type: str - self.is_read = False # type: bool - self.size = 0 # type: int - self.source_url = "" # type: str - self.source_uuid = "" # type: str - self.submission_url = "" # type: str - self.uuid = "" # type: str - - if ["uuid"] == list(kwargs.keys()): - # Means we are creating an object only for fetching from server. - self.uuid = kwargs["uuid"] - return - - for key in [ - "download_url", - "filename", - "is_read", - "size", - "source_url", - "submission_url", - "uuid", - ]: - if not key in kwargs: - AttributeError("Missing key {}".format(key)) - setattr(self, key, kwargs[key]) - _, self.source_uuid = self.source_url.rsplit('/', 1) - - -class Source: - """ - This class represents a source object in the server. - """ - - def __init__(self, **kwargs): - self.add_star_url = "" # type: str - self.interaction_count = 0 # type: int - self.is_flagged = False # type: bool - self.is_starred = False # type: bool - self.journalist_designation = "" # type: str - self.key = {} # type: Dict - self.last_updated = "" # type: str - self.number_of_documents = 0 # type: int - self.number_of_messages = 0 # type: int - self.remove_star_url = "" # type: str - self.replies_url = "" # type: str - self.submissions_url = "" # type: str - self.url = "" # type: str - self.uuid = "" # type: str - - if ["uuid"] == list(kwargs.keys()): - # Means we are creating an object only for fetching from server. - self.uuid = kwargs["uuid"] - return - - for key in [ - "add_star_url", - "interaction_count", - "is_flagged", - "is_starred", - "journalist_designation", - "key", - "last_updated", - "number_of_documents", - "number_of_messages", - "remove_star_url", - "replies_url", - "submissions_url", - "url", - "uuid", - ]: - if not key in kwargs: - AttributeError("Missing key {}".format(key)) - setattr(self, key, kwargs[key]) +from .sdlocalobjects import * +from .proxiapi import APIProxy, json_query class API: @@ -188,16 +32,18 @@ def __init__(self, address, username, passphrase, totp) -> None: self.token = {"token": "", "expiration": ""} self.auth_header = {"Authorization": ""} # type: Dict - def authenticate(self) -> bool: + def authenticate(self, totp = "") -> bool: """ Authenticate the user and fetches the token from the server. :returns: True if authentication is successful, raise AuthError otherwise. """ + if not totp: + totp = self.totp user_data = { "username": self.username, "passphrase": self.passphrase, - "one_time_code": self.totp, + "one_time_code": totp, } token = requests.post(self.server + "api/v1/token", data=json.dumps(user_data)) diff --git a/sdclientapi/proxiapi.py b/sdclientapi/proxiapi.py new file mode 100644 index 000000000..4c73c7d36 --- /dev/null +++ b/sdclientapi/proxiapi.py @@ -0,0 +1,155 @@ +from pprint import pprint +import os +import json +from subprocess import PIPE, Popen + +from .sdlocalobjects import * + +from typing import Optional, Dict, List, Tuple + + +def json_query(data): + """ + Takes a json based query and passes to the network proxy. + Returns the JSON output from the proxy. + """ + proxyvmname = "proxy-debian" + p = Popen( + ["/usr/lib/qubes/qrexec-client-vm", proxyvmname, "securedrop.Proxy"], + stdin=PIPE, + stdout=PIPE, + ) + p.stdin.write(data.encode("utf-8")) + d = p.communicate() + output = d[0].decode("utf-8") + return output.strip() + + +class APIProxy: + """ + This is class to do all the network calls to the SecureDrop API server. + + :param address: Server URL (http://localhost:8081/) + :param username: Journalist username + :param passphrase: Journalist passphrase + :param totp: Current TOTP value + :returns: An object of API class. + """ + + def __init__(self, address, username, passphrase, totp) -> None: + """ + Primary API class, this is the only thing which will make network call. + """ + + self.server = address # type: str + self.username = username # type: str + self.passphrase = passphrase # type: str + self.totp = totp # type: str + self.token = {"token": "", "expiration": ""} + self.auth_header = {"Authorization": ""} # type: Dict + + def authenticate(self, totp = "") -> bool: + """ + Authenticate the user and fetches the token from the server. + + :returns: True if authentication is successful, raise AuthError otherwise. + """ + if not totp: + totp = self.totp + user_data = { + "username": self.username, + "passphrase": self.passphrase, + "one_time_code": totp, + } + method = "POST" + path_query = "api/v1/token" + body = json.dumps(user_data) + + data = {"method": method, "path_query": path_query, "body": body} + + try: + result = json.loads(json_query(json.dumps(data))) + token_data = json.loads(result["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + if not "expiration" in token_data: + raise AuthError("Authentication error") + + self.token = token_data + self.update_auth_header() + # If we are here, means the method call was successful. + return True + + def update_auth_header(self): + self.auth_header = { + "Authorization": "token " + self.token["token"], + "Content-Type": "application/json", + "Accept": "application/json", + } + + + def get_sources(self) -> List[Source]: + """ + Returns a list of all the sources from the Server. + + :returns: List of Source objects. + """ + path_query = "api/v1/sources" + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + sources = data["sources"] + result = [] # type: List[Source] + + for source in sources: + s = Source(**source) + result.append(s) + + return result + + def get_source(self, source: Source) -> Source: + """ + This will return a single Source based on UUID. + + :param source: Source object containing only source's uuid value. + :returns: Source object fetched from server for the given UUID value. + """ + path_query = "api/v1/sources/{}".format(source.uuid) + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + return Source(**data) + + def get_source_from_string(self, uuid: str) -> Source: + """ + This will fetch a source from server and return it. + + :param uuid: Source UUID as string. + :returns: Source object fetched from server for the given UUID value. + """ + + s = Source(uuid=uuid) + return self.get_source(s) \ No newline at end of file diff --git a/sdclientapi/sdlocalobjects.py b/sdclientapi/sdlocalobjects.py new file mode 100644 index 000000000..7957b8598 --- /dev/null +++ b/sdclientapi/sdlocalobjects.py @@ -0,0 +1,157 @@ +class BaseError(Exception): + pass + + +class ReplyError(BaseError): + "For errors on reply messages" + + def __init__(self, message): + self.msg = message + + def __str__(self): + return repr(self.msg) + + +class WrongUUIDError(BaseError): + "For missing UUID, can be for source or submission" + + def __init__(self, message): + self.msg = message + + def __str__(self): + return repr(self.msg) + + +class AuthError(BaseError): + "For Authentication errors" + + def __init__(self, message): + self.msg = message + + def __str__(self): + return repr(self.msg) + + +class AttributeError(BaseError): + def __init__(self, message): + self.msg = message + + def __str__(self): + return repr(self.msg) + + +class Reply: + """ + This class represents a reply to the source. + """ + + def __init__(self, **kwargs) -> None: + self.filename = "" # type: str + self.journalist_username = "" # type: str + self.journalist_uuid = "" # type: str + self.is_deleted_by_source = False # type: bool + self.reply_url = "" # type: str + self.size = 0 # type: int + self.source_url = "" # type: str + self.source_uuid = "" # type: str + self.uuid = "" # type: str + + for key in [ + "filename", + "journalist_username", + "journalist_uuid", + "is_deleted_by_source", + "reply_url", + "size", + "source_url", + "uuid", + ]: + if not key in kwargs: + AttributeError("Missing key {}".format(key)) + setattr(self, key, kwargs[key]) + + # Now let us set source uuid + values = self.source_url.split("/") + self.source_uuid = values[-1] + + +class Submission: + """ + This class represents a submission object in the server. + """ + + def __init__(self, **kwargs) -> None: + self.download_url = "" # type: str + self.filename = "" # type: str + self.is_read = False # type: bool + self.size = 0 # type: int + self.source_url = "" # type: str + self.source_uuid = "" # type: str + self.submission_url = "" # type: str + self.uuid = "" # type: str + + if ["uuid"] == list(kwargs.keys()): + # Means we are creating an object only for fetching from server. + self.uuid = kwargs["uuid"] + return + + for key in [ + "download_url", + "filename", + "is_read", + "size", + "source_url", + "submission_url", + "uuid", + ]: + if not key in kwargs: + AttributeError("Missing key {}".format(key)) + setattr(self, key, kwargs[key]) + _, self.source_uuid = self.source_url.rsplit("/", 1) + + +class Source: + """ + This class represents a source object in the server. + """ + + def __init__(self, **kwargs): + self.add_star_url = "" # type: str + self.interaction_count = 0 # type: int + self.is_flagged = False # type: bool + self.is_starred = False # type: bool + self.journalist_designation = "" # type: str + self.key = {} # type: Dict + self.last_updated = "" # type: str + self.number_of_documents = 0 # type: int + self.number_of_messages = 0 # type: int + self.remove_star_url = "" # type: str + self.replies_url = "" # type: str + self.submissions_url = "" # type: str + self.url = "" # type: str + self.uuid = "" # type: str + + if ["uuid"] == list(kwargs.keys()): + # Means we are creating an object only for fetching from server. + self.uuid = kwargs["uuid"] + return + + for key in [ + "add_star_url", + "interaction_count", + "is_flagged", + "is_starred", + "journalist_designation", + "key", + "last_updated", + "number_of_documents", + "number_of_messages", + "remove_star_url", + "replies_url", + "submissions_url", + "url", + "uuid", + ]: + if not key in kwargs: + AttributeError("Missing key {}".format(key)) + setattr(self, key, kwargs[key]) From 8ee421f3e6af889128eecbbadc164db672830d99 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Wed, 10 Oct 2018 13:41:39 -0400 Subject: [PATCH 02/14] Adds all methods except download files for ``APIProxy`` class The methods have same calling signature as in ``API`` class, thus will help the developers to use the either as required. --- sdclientapi/proxiapi.py | 478 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 471 insertions(+), 7 deletions(-) diff --git a/sdclientapi/proxiapi.py b/sdclientapi/proxiapi.py index 4c73c7d36..6f949570f 100644 --- a/sdclientapi/proxiapi.py +++ b/sdclientapi/proxiapi.py @@ -48,7 +48,7 @@ def __init__(self, address, username, passphrase, totp) -> None: self.token = {"token": "", "expiration": ""} self.auth_header = {"Authorization": ""} # type: Dict - def authenticate(self, totp = "") -> bool: + def authenticate(self, totp="") -> bool: """ Authenticate the user and fetches the token from the server. @@ -66,15 +66,15 @@ def authenticate(self, totp = "") -> bool: body = json.dumps(user_data) data = {"method": method, "path_query": path_query, "body": body} - + try: result = json.loads(json_query(json.dumps(data))) - token_data = json.loads(result["body"]) + token_data = json.loads(result["body"]) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") if not "expiration" in token_data: raise AuthError("Authentication error") - + self.token = token_data self.update_auth_header() # If we are here, means the method call was successful. @@ -86,7 +86,6 @@ def update_auth_header(self): "Content-Type": "application/json", "Accept": "application/json", } - def get_sources(self) -> List[Source]: """ @@ -131,7 +130,7 @@ def get_source(self, source: Source) -> Source: try: res = json.loads(json_query(json.dumps(data))) - + if res["status"] == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) data = json.loads(res["body"]) @@ -152,4 +151,469 @@ def get_source_from_string(self, uuid: str) -> Source: """ s = Source(uuid=uuid) - return self.get_source(s) \ No newline at end of file + return self.get_source(s) + + def delete_source(self, source: Source) -> bool: + """ + This method will delete the source and collection. If the uuid + is not found in the server, it will raise WrongUUIDError. + + :param source: Source object containing only source's uuid value. + :returns: True if successful, raises Errors in case of wrong values. + """ + path_query = "api/v1/sources/{}".format(source.uuid) + method = "DELETE" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + if "message" in data and data["message"] == "Source and submissions deleted": + return True + + # We should never reach here + return False + + def delete_source_from_string(self, uuid: str) -> bool: + """ + This method will delete the source and collection. If the uuid + is not found in the server, it will raise WrongUUIDError. + + :param uuid: Source UUID as string. + :returns: True if the operation is successful. + """ + + s = Source(uuid=uuid) + return self.delete_source(s) + + def add_star(self, source: Source) -> bool: + """ + Adds a star to a given source. + + :param source: The source object to whom we want add a star. + :returns: True if successful, raises Error otherwise. + """ + path_query = "api/v1/sources/{}/add_star".format(source.uuid) + method = "POST" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "message" in data and data["message"] == "Star added": + return True + + return False + + def remove_star(self, source: Source) -> bool: + """Removes star from a given Source. + + :param source: Source object to remove the star from. + :returns: True if successful, raises Error otherwise. + """ + path_query = "api/v1/sources/{}/remove_star".format(source.uuid) + method = "delete" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "message" in data and data["message"] == "Star removed": + return True + + return False + + def get_submissions(self, source: Source) -> List[Submission]: + """ + Returns a list of Submission objects from the server for a given source. + + :param source: Source object for whom we want to find all the submissions. + :returns: List of Submission objects. + """ + path_query = "api/v1/sources/{}/submissions".format(source.uuid) + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + result = [] # type: List[Submission] + values = data["submissions"] + + for val in values: + s = Submission(**val) + result.append(s) + + return result + + def get_submission(self, submission: Submission) -> Submission: + """ + Returns the updated Submission object from the server. + + :param submission: Submission object we want to update. + :returns: Updated submission object from the server. + """ + source_uuid = submission.source_url.split("/")[-1] + path_query = "api/v1/sources/{}/submissions/{}".format( + source_uuid, submission.uuid + ) + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing submission {}".format(submission.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + return Submission(**data) + + def get_submission_from_string(self, uuid: str, source_uuid: str) -> Submission: + """ + Returns the updated Submission object from the server. + + :param uuid: UUID of the Submission object. + :param source_uuid: UUID of the source. + :returns: Updated submission object from the server. + """ + s = Submission(uuid=uuid) + s.source_uuid = source_uuid + s.source_url = "/api/v1/sources/{}".format(source_uuid) + return self.get_submission(s) + + def get_all_submissions(self) -> List[Submission]: + """ + Returns a list of Submission objects from the server. + + :returns: List of Submission objects. + """ + path_query = "api/v1/submissions" + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + result = [] # type: List[Submission] + values = data["submissions"] + + for val in values: + s = Submission(**val) + result.append(s) + + return result + + def delete_submission(self, submission: Submission) -> bool: + """ + Deletes a given Submission object from the server. + + :param submission: The Submission object we want to delete in the server. + :returns: True if successful, raises Error otherwise. + """ + # Not using direct URL because this helps to use the same method + # from local submission (not fetched from server) objects. + # See the *from_string for an example. + source_uuid = submission.source_url.split("/")[-1] + path_query = "api/v1/sources/{}/submissions/{}".format( + source_uuid, submission.uuid + ) + method = "DELETE" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing submission {}".format(submission.uuid)) + + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + if "message" in data and data["message"] == "Submission deleted": + return True + # We should never reach here + return False + + def delete_submission_from_string(self, uuid: str, source_uuid: str) -> bool: + """ + Deletes a given Submission based on uuids from the server. + + :param uuid: UUID of the Submission object. + :param source_uuid: UUID of the source. + :returns: Updated submission object from the server. + """ + s = Submission(uuid=uuid) + s.source_url = "/api/v1/sources/{}".format(source_uuid) + return self.delete_submission(s) + + def flag_source(self, source: Source) -> bool: + """ + Flags a source for reply. + + :param source: Source object we want to flag. + :returns: True if successful, raises Error otherwise. + """ + path_query = "api/v1/sources/{}/flag".format(source.uuid) + method = "POST" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + return True + + def get_current_user(self): + """ + Returns a dictionary of the current user data. + + Example: + + { + 'is_admin': True, + 'last_login': '2018-08-01T19:10:38.199429Z', + 'username': 'journalist' + } + """ + path_query = "api/v1/user" + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + return data + + def reply_source(self, source: Source, msg: str) -> bool: + """ + This method is used to reply to a given source. The message should be preencrypted with the source's + GPG public key. + + :param source: Source object we want to reply. + :param msg: Encrypted message with Source's GPG public key. + """ + path_query = "api/v1/sources/{}/replies".format(source.uuid) + method = "POST" + + reply = {"reply": msg} + body = json.dumps(reply) + + data = { + "method": method, + "path_query": path_query, + "headers": self.auth_header, + "body": body, + } + + print(json.dumps(data)) + + try: + res = json.loads(json_query(json.dumps(data))) + data = json.loads(res["body"]) + + if res["status"] == 400: + raise ReplyError(data["message"]) + + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + if "message" in data and data["message"] == "Your reply has been stored": + return True + # We should never reach here + return False + + def get_replies_from_source(self, source: Source) -> List[Reply]: + """ + This will return a list of replies associated with a source. + + :param source: Source object containing only source's uuid value. + :returns: List of Reply objects. + """ + path_query = "api/v1/sources/{}/replies".format(source.uuid) + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + result = [] + for datum in data["replies"]: + reply = Reply(**datum) + result.append(reply) + + return result + + def get_reply_from_source(self, source: Source, reply_uuid: str) -> Reply: + """ + This will return a single specific reply. + + :param source: Source object. + :param reply_uuid: UUID of the reply. + :returns: A reply object + """ + path_query = "api/v1/sources/{}/replies/{}".format(source.uuid, reply_uuid) + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + reply = Reply(**data) + + return reply + + def get_all_replies(self) -> List[Reply]: + """ + This will return a list of all replies from the server. + + :returns: List of Reply objects. + """ + path_query = "api/v1/replies" + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + result = [] + for datum in data["replies"]: + reply = Reply(**datum) + result.append(reply) + + return result + + def delete_reply(self, reply: Reply) -> bool: + """ + Deletes a given Reply object from the server. + + :param reply: The Reply object we want to delete in the server. + :returns: True if successful, raises Error otherwise. + """ + # Not using direct URL because this helps to use the same method + # from local reply (not fetched from server) objects. + # See the *from_string for an example. + source_uuid = reply.source_url.split("/")[-1] + path_query = "api/v1/sources/{}/replies/{}".format(source_uuid, reply.uuid) + method = "DELETE" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing reply {}".format(reply.uuid)) + + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + if "message" in data and data["message"] == "Reply deleted": + return True + # We should never reach here + return False From ed5e468530c03f0d563c65253f8eb223bced059f Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 03:08:03 -0400 Subject: [PATCH 03/14] Fixes the typo in proxyapi filename --- sdclientapi/__init__.py | 4 ++-- sdclientapi/{proxiapi.py => proxyapi.py} | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) rename sdclientapi/{proxiapi.py => proxyapi.py} (99%) diff --git a/sdclientapi/__init__.py b/sdclientapi/__init__.py index e52e5e4c5..cdb87ec93 100644 --- a/sdclientapi/__init__.py +++ b/sdclientapi/__init__.py @@ -6,7 +6,7 @@ from typing import Optional, Dict, List, Tuple from .sdlocalobjects import * -from .proxiapi import APIProxy, json_query +from .proxyapi import APIProxy, json_query class API: @@ -32,7 +32,7 @@ def __init__(self, address, username, passphrase, totp) -> None: self.token = {"token": "", "expiration": ""} self.auth_header = {"Authorization": ""} # type: Dict - def authenticate(self, totp = "") -> bool: + def authenticate(self, totp="") -> bool: """ Authenticate the user and fetches the token from the server. diff --git a/sdclientapi/proxiapi.py b/sdclientapi/proxyapi.py similarity index 99% rename from sdclientapi/proxiapi.py rename to sdclientapi/proxyapi.py index 6f949570f..37c4c7f26 100644 --- a/sdclientapi/proxiapi.py +++ b/sdclientapi/proxyapi.py @@ -476,8 +476,6 @@ def reply_source(self, source: Source, msg: str) -> bool: "body": body, } - print(json.dumps(data)) - try: res = json.loads(json_query(json.dumps(data))) data = json.loads(res["body"]) From e3a7bbd96f1a28f788ea41546970aa5ef054bdb4 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 06:14:02 -0400 Subject: [PATCH 04/14] Adds a new decorator for testing qrexec service We now have a decorator dastollervey_datasaver which can help to mock out qrexec calls to securedrop-proxy service. This saves the mock input/output into data/ directory. --- tests/utils.py | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 tests/utils.py diff --git a/tests/utils.py b/tests/utils.py new file mode 100644 index 000000000..e2097781a --- /dev/null +++ b/tests/utils.py @@ -0,0 +1,91 @@ +import os +import json +from pprint import pprint +from sdclientapi import json_query +from unittest.mock import MagicMock, patch + +from typing import Optional, Dict, List, Tuple + +# We are making calls to securedrop.Proxy qrexec service +# in the QubesOS to get the data from the server. This is difficult to test +# unless we have an easy way to store/cache each function call and returned +# result. In this file we have a new decorator called `dastollervey_datasaver`. +# This decorator checks for each json_query call and related arguments sent +# to the function, and then stores the result in a json file if required. +# From the next time, for the same signature, it will serve the result from the +# stored cache and will enable us to write unittests which can run without a +# real server. +# The result files will be stored in data/function_name.json files. + +RES = {} +CALLNUMBER = 0 + + +alternative = json_query + + +def internal_sideeffect(*args, **kwargs): + global CALLNUMBER + global RES + CALLNUMBER += 1 + arguments = tuple(args) + # Now remove the one time code + # As it will be a different value every time. + python_args = json.loads(args[0]) + + try: + value_str = python_args["body"] + value = json.loads(value_str) + del value["one_time_code"] + python_args["body"] = json.dumps(value) + newargs = json.dumps(python_args) + arguments = (newargs,) + except: + pass # Means no body in the call + + # Now remove the authorization token from the key + # Because in differnet runs, the token would be different + # that is why we have to remove that. + try: + value = python_args["headers"] + del value["Authorization"] + python_args["headers"] = json.dumps(value) + newargs = json.dumps(python_args) + arguments = (newargs,) + except Exception as err: + pass # Means no Authorization token in the call + + key = str((arguments, CALLNUMBER)) + answer = RES.get(key, None) + if not answer: + # Means it is not in cache. + # So, execute the real function and store in cache + answer = alternative(*args) + RES[key] = answer + return answer + + +def dastollervey_datasaver(func): + "This is the decorator to save qrexec call data" + + def wrapper(*args, **kwargs): + global CALLNUMBER + global RES + # This is the filename to store the results + filename = os.path.join("data", func.__name__ + ".json") + + if os.path.exists(filename): + with open(filename) as fobj: + RES = json.load(fobj) + mock = MagicMock() + mock.side_effect = internal_sideeffect + with patch("sdclientapi.proxyapi.json_query", mock): + result = func(*args, **kwargs) + + if not os.path.exists(filename): + with open(filename, "w") as fobj: + json.dump(RES, fobj) + CALLNUMBER = 0 + return result + + return wrapper From 86a19e800b767340727c1acb067dc6fb89830ae5 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 06:16:49 -0400 Subject: [PATCH 05/14] Adds tests for the APIProxy class Uses dastollervey_datasaver decorator to save the mock data. --- data/setUp.json | 1 + data/test_delete_reply.json | 1 + data/test_delete_source.json | 1 + data/test_delete_source_from_string.json | 1 + data/test_delete_submission.json | 1 + data/test_delete_submission_from_string.json | 1 + data/test_error_unencrypted_reply.json | 1 + data/test_failed_single_source.json | 1 + data/test_flag_source.json | 1 + data/test_get_all_replies.json | 1 + data/test_get_all_submissions.json | 1 + data/test_get_current_user.json | 1 + data/test_get_replies_from_source.json | 1 + data/test_get_reply_from_source.json | 1 + data/test_get_single_source.json | 1 + data/test_get_single_source_from_string.json | 1 + data/test_get_sources.json | 1 + data/test_get_submission.json | 1 + data/test_get_submission_from_string.json | 1 + data/test_get_submissions.json | 1 + data/test_get_wrong_submissions.json | 1 + data/test_reply_source.json | 1 + data/test_star_add_remove.json | 1 + tests/test_apiproxy.py | 233 +++++++++++++++++++ 24 files changed, 256 insertions(+) create mode 100644 data/setUp.json create mode 100644 data/test_delete_reply.json create mode 100644 data/test_delete_source.json create mode 100644 data/test_delete_source_from_string.json create mode 100644 data/test_delete_submission.json create mode 100644 data/test_delete_submission_from_string.json create mode 100644 data/test_error_unencrypted_reply.json create mode 100644 data/test_failed_single_source.json create mode 100644 data/test_flag_source.json create mode 100644 data/test_get_all_replies.json create mode 100644 data/test_get_all_submissions.json create mode 100644 data/test_get_current_user.json create mode 100644 data/test_get_replies_from_source.json create mode 100644 data/test_get_reply_from_source.json create mode 100644 data/test_get_single_source.json create mode 100644 data/test_get_single_source_from_string.json create mode 100644 data/test_get_sources.json create mode 100644 data/test_get_submission.json create mode 100644 data/test_get_submission_from_string.json create mode 100644 data/test_get_submissions.json create mode 100644 data/test_get_wrong_submissions.json create mode 100644 data/test_reply_source.json create mode 100644 data/test_star_add_remove.json create mode 100644 tests/test_apiproxy.py diff --git a/data/setUp.json b/data/setUp.json new file mode 100644 index 000000000..fad9854c0 --- /dev/null +++ b/data/setUp.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_delete_reply.json b/data/test_delete_reply.json new file mode 100644 index 000000000..db1b2bc9a --- /dev/null +++ b/data/test_delete_reply.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"headers\": {\"Content-Length\": \"1971\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1Njo0MSBHTVQifX0.DqCv2Q.Aa1MGzdgfUWB63aKSZfohanri1g; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:56:41 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/568e17fd-5492-4f99-af5d-9da8095892b0\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"568e17fd-5492-4f99-af5d-9da8095892b0\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"headers\": {\"Content-Length\": \"33\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:56:41 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1Njo0MSBHTVQifX0.DqCv2Q.Aa1MGzdgfUWB63aKSZfohanri1g; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Reply deleted\\\"\\n}\\n\", \"status\": 200}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:56:42 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1Njo0MiBHTVQifX0.DqCv2g.KNj2na3j6Y07VFG2W4oPyW3aCTw; HttpOnly; Path=/\", \"Content-Length\": \"1480\"}, \"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/568e17fd-5492-4f99-af5d-9da8095892b0\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"568e17fd-5492-4f99-af5d-9da8095892b0\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_delete_source.json b/data/test_delete_source.json new file mode 100644 index 000000000..00b1dac4e --- /dev/null +++ b/data/test_delete_source.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMSBHTVQifX0.DqCspQ.77BI6fHXE1savwdYvI-jOFdq_6Q; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:43:01 GMT\", \"Content-Length\": \"5236\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4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lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9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bhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874l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vbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Content-Length\": \"2630\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_delete_source_from_string.json b/data/test_delete_source_from_string.json new file mode 100644 index 000000000..00b1dac4e --- /dev/null +++ b/data/test_delete_source_from_string.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMSBHTVQifX0.DqCspQ.77BI6fHXE1savwdYvI-jOFdq_6Q; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:43:01 GMT\", \"Content-Length\": \"5236\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJir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xYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1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\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\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Mv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Content-Length\": \"2630\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_delete_submission.json b/data/test_delete_submission.json new file mode 100644 index 000000000..94a5c80c7 --- /dev/null +++ b/data/test_delete_submission.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0NToyOCBHTVQifX0.DqCtOA.jU6MzsluD8-xcnKAUdaA6ru4cj0; HttpOnly; Path=/\", \"Content-Length\": \"2049\", \"Date\": \"Thu, 11 Oct 2018 09:45:28 GMT\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/1706cab3-32ee-4242-ae83-7ece90405581/download\\\", \\n \\\"filename\\\": \\\"1-palatial_stranger-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/1706cab3-32ee-4242-ae83-7ece90405581\\\", \\n \\\"uuid\\\": \\\"1706cab3-32ee-4242-ae83-7ece90405581\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc/download\\\", \\n \\\"filename\\\": \\\"2-palatial_stranger-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc\\\", \\n \\\"uuid\\\": \\\"e1d4d0b2-55cf-471c-9917-a41b164947bc\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d/download\\\", \\n \\\"filename\\\": \\\"1-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d\\\", \\n \\\"uuid\\\": \\\"356ae820-9776-44f7-9521-ea53b0a6772d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9/download\\\", \\n \\\"filename\\\": \\\"2-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\", \\n \\\"uuid\\\": \\\"1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/1706cab3-32ee-4242-ae83-7ece90405581\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:45:29 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"38\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0NToyOCBHTVQifX0.DqCtOQ.wx3hv-MocAmCs3Ihf3UQ1oCuwZc; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0NToyOSBHTVQifX0.DqCtOQ.kxllaJiRAVSG3Vxjkpqn8aJopWA; HttpOnly; Path=/\", \"Content-Length\": \"1543\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:45:29 GMT\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc/download\\\", \\n \\\"filename\\\": \\\"2-palatial_stranger-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc\\\", \\n \\\"uuid\\\": \\\"e1d4d0b2-55cf-471c-9917-a41b164947bc\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d/download\\\", \\n \\\"filename\\\": \\\"1-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d\\\", \\n \\\"uuid\\\": \\\"356ae820-9776-44f7-9521-ea53b0a6772d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9/download\\\", \\n \\\"filename\\\": \\\"2-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\", \\n \\\"uuid\\\": \\\"1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_delete_submission_from_string.json b/data/test_delete_submission_from_string.json new file mode 100644 index 000000000..de1930ffc --- /dev/null +++ b/data/test_delete_submission_from_string.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Content-Type\": \"application/json\", \"Content-Length\": \"5242\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0NiBHTVQifX0.DqCthg.wiR7MaGytFIPGy3HKCIiPrIrTfk; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:46:46 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"contented grouping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/G9UBEACtS3ofKMNSL+HYmcbAcy8pwg8Ka2nLhBYcUO0K17OmFYb9IKCf\\\\nGrXOyz5NX/qCtKh7dekIdichdoLIDa9SC1Lu04mCo2ZPE6Up9WwQDgdyWdWtPgF6\\\\n3A+4I90U1NJnMiasskm9gu8XqVeMaeo92W61x8i1d5J+VlxP3d3sdhUw3uLGaKC4\\\\naLrGTXUZRyWnrvX0pL7s8R2ejeYDyAPJp0DFhrqTWsn0jRvj42ifPvCzrL+yfy7e\\\\n6z1HoHV3VXr/rJ+RDCDVwVJAMuXAnWfu4srje6tIJUttwSgm84ddwN6GZO1RXn9H\\\\nNKZM7yCgX9Y5nHbNNLmKSOZKfHSHnb7q/Etg0+WD1MzGlwcYDkZfi5jqNUMxfmFt\\\\nkEuduqKXNomTci2MLVrbWlLLlryqUj8zoTKORWW18hvLaySdON5Xf0dCOvrejIIK\\\\nJ6Cav6qauXSubWiZhASUq2bUJdSLMXwa+X9vkPVvnhKwdpZYk43DAtRTmVIUaRed\\\\nNsWy2FVZAsF0lUrJ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kOy2\\\\nNLx8R9WF94jlWRV34oGzoypmuUatM6TQ4lDmS9EJMmMAoTX7thXvOccM6fGzzpKM\\\\nr43Q0/QlNWGaxbMOGZGEv5KjkbW0j96tk1BdG1mUlfc=\\\\n=f2cz\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:45:58.929266Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"uuid\\\": \\\"19878649-3bab-48a5-bbd1-ab0056b30a5f\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"gynecological barring\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/G9gBEADiHoYNc7lFejOarQgSdXlwuxazH4Msj1dlIDdYh9okm6fok1o2\\\\n12mCVgckXChus5qRZv5gX57clyJBOTNsYWGds+/wvIKJpRuf0bKwf38/faKvqlON\\\\nU5W/J1KizoyDHUY3PkSCrFpSFawwBsSbeUQ298BabWdUDT91lAAVF3SD3BXsEp7P\\\\n0ayI6yLd//d+Q8YAPaskwzqMUZZ1yk+PtYYs502gjE4FFizLKF7mofqAwwTYCI8N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Q5EP2Oj9ueU8FddAUsVgPlHPlJs+Xqsz/QC1Xn3O81gv\\\\nHWEggJFq7CFJjKN+WHk6oWZAJt5VZCEdzTzODJIITjz6rvohiYRPIj+x1Cs70vM0\\\\nLIamxoYvRVVerbqQhyoJ2aXOJpLrWcoSBHsIVytjRufcEerj16HuOLBTImGCRJgV\\\\nk4xpkYu+RLNCeX1m4jvykX0Z360F8RoxLiIw4WA+JoR/vhdFy0DKI398JeP0qgzk\\\\nY0s6Hsnx6MI6YTsasgV1uAFGewTr550XGvtI+O8M92XBpXSIVUtDsOH23lpMGGjU\\\\nvUwkJOk6ctxmKuSYZUNkRP5LAozj6OCxZ3El3QkMQVRU343zirgv14YOc0wId90t\\\\nQ3x/1/ylG/r21alL8v1vMuLBFxYzLuqLQEDLjvIlJ1c=\\\\n=I6Uj\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:46:03.178691Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479\\\", \\n \\\"uuid\\\": \\\"efad4260-cad7-4588-9972-693f684f6479\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:46:46 GMT\", \"Content-Length\": \"1039\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0NiBHTVQifX0.DqCthg.wiR7MaGytFIPGy3HKCIiPrIrTfk; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/2f71409f-80c9-408e-ad7b-ff1bd652f24e/download\\\", \\n \\\"filename\\\": \\\"1-contented_grouping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/2f71409f-80c9-408e-ad7b-ff1bd652f24e\\\", \\n \\\"uuid\\\": \\\"2f71409f-80c9-408e-ad7b-ff1bd652f24e\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687/download\\\", \\n \\\"filename\\\": \\\"2-contented_grouping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687\\\", \\n \\\"uuid\\\": \\\"fd34fab8-aece-4e7b-af32-360a4dde3687\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/2f71409f-80c9-408e-ad7b-ff1bd652f24e\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:46:47 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0NyBHTVQifX0.DqCthw.iVUctwvUnnE8eh5Sh_Adt4YObIM; HttpOnly; Path=/\", \"Content-Length\": \"38\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 4)": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687/download\\\", \\n \\\"filename\\\": \\\"2-contented_grouping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687\\\", \\n \\\"uuid\\\": \\\"fd34fab8-aece-4e7b-af32-360a4dde3687\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f710db08-2c6c-4b64-a59d-5a32b176e4e4/download\\\", \\n \\\"filename\\\": \\\"1-gynecological_barring-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f710db08-2c6c-4b64-a59d-5a32b176e4e4\\\", \\n \\\"uuid\\\": \\\"f710db08-2c6c-4b64-a59d-5a32b176e4e4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f0e0c25d-4860-4496-b786-c9968ae0da5f/download\\\", \\n \\\"filename\\\": \\\"2-gynecological_barring-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f0e0c25d-4860-4496-b786-c9968ae0da5f\\\", \\n \\\"uuid\\\": \\\"f0e0c25d-4860-4496-b786-c9968ae0da5f\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0OCBHTVQifX0.DqCtiA.cN22aEq6BsU9fc2HU-9bRjHJfsU; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:46:48 GMT\", \"Content-Length\": \"1552\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}"} \ No newline at end of file diff --git a/data/test_error_unencrypted_reply.json b/data/test_error_unencrypted_reply.json new file mode 100644 index 000000000..87cf7c34d --- /dev/null +++ b/data/test_error_unencrypted_reply.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"pyrrhic bullfinch\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HCUBEAC91OgTBsFOm+JJGl7i+jS/oR6ARJM88227D0YjqHJgoCTriTbt\\\\nrVcqgYK1w0zS2p60UIAiuPBKHkRS1Qs362AYvi8XJQwt6bmaz7Rg09j5ctugmN+L\\\\n/4lDHtVgs08Nw0BkOvj/ZGAaSHS72DI8XoPNoZ8GNSRYO/JWZD1lz3QxT5vstNbU\\\\nj6514BWs/tfW9jItGBbycUSTaPeAuez20ipqn9VoaTMWDcl1rwHiKGbI4QDU3rqu\\\\n4sWB5fGgwJmfZWa3TVaTLyluhaMac9TaXgVrGEAKLbDaNrxxQ8ChFmAlwHMrWCn0\\\\ne8yi/JnIYAXwzFA7fbFQf8lNIWQdNmLf+FCsInn6g7qafXIU/VeWCosy06XrZBaV\\\\n5nzNLrb0pcrRJVfUDAKmdwkJB6J/trNdt1N8udgfGcP9REquB5io+pnR7tK0/DTI\\\\nS8R+XN87n1w3eQVPhrvK6qK3i/NznA0nArfj72tnCiWrt9/F9z/Ioc9zdxjEzz5j\\\\niWLPeUBriITWTteVgSsBl+BLud5xYloIt/G+eLrr8SrtGhbLioTz2RMzpFtCw467\\\\nIMIlcsL+zgQGXIOsAy1vHpJ1z3qPQmOObY08GaPVXa3y4P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umd5aoRyU3eSKAb1fhhZyUt/DRTS0=\\\\n=l0jn\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:47:19.113278Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\", \\n \\\"uuid\\\": \\\"7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"holier-than-thou naturalness\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HCkBEAC2NvMI+VEwhOK4eu9kbAya+1yhZ08v5+DUi+C6vyj5CsBuFpeV\\\\nH3yDGmFjv9I7mY+1InJYS91BnjWKT65XbYqP/NKHQ9Jljbx/wPxSJcWsw45qugez\\\\nAuDUFlANGJsGVTnMJBquJQnoO5Pl/RmMYMKO2RTN1nymhoNismXjZz/wHSvpy571\\\\np06YJsXA6Uq/xn2G82/OskoM1tcJRMwL53nq9rLUqTdhF4pWQp7Nh4p3/2apZbQW\\\\nRUS5/4JLjaIReTFt4C20q7wnqRtLGVco9CsSNiOjcDhpfeL9rl2nf+SzKSEyJQz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Mhbvds3+onP9m3AZjpHu3qfjIxsU5z1StH\\\\nZsqTlo4GsCqVJ1sI5lwVd21Be4zU/o1clcfslSUA2z3qhAuJTua+VGSTzIlQXWNl\\\\na4gD4G1N9vxVq9+R5iBhmR1R/HWQQHzcIfGXGfwZZnJ7mCKiyolK5BzjeuXwJAcB\\\\nJd0i292n4X18Qt3QRZpoPNv98zlXmDpOvx0tx7YVtBMnk1PMGCvO9FBMTCSuBAHq\\\\nZcrFZ/WYMC1zuIqMSb8HG/A8uSPZROsXLmg4NFTZVKBdD+qM2KzVKkP0M0CBwm2N\\\\nQ6Rprit71tO9Q3tgA3SAI8+p7TUrlr8Q+d6l2EvZepU=\\\\n=F9qf\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:47:26.387946Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8\\\", \\n \\\"uuid\\\": \\\"425d1364-e30d-405d-8767-81274ab8e7b8\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Length\": \"5248\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0OTowMSBHTVQifX0.DqCuDQ.XSsO2pLvYr9ZLTFVX6hes1KlJNo; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:49:01 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\", \"body\": \"{\\\\\"reply\\\\\": \\\\\"hello\\\\\"}\"}',), 2)": "{\"status\": 400, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"You must encrypt replies client side\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0OTowMiBHTVQifX0.DqCuDg.0qox_zY8ebFaIVMf7cmZq58AnXw; HttpOnly; Path=/\", \"Content-Length\": \"56\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:49:02 GMT\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file diff --git a/data/test_failed_single_source.json b/data/test_failed_single_source.json new file mode 100644 index 000000000..544631e58 --- /dev/null +++ b/data/test_failed_single_source.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/not there\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMiBHTVQifX0.DqCsfg.GSJj_T6bDKK8eMGxx7EMpvAu0y4; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"166\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\", \"Content-Type\": \"application/json\"}, \"status\": 404}"} \ No newline at end of file diff --git a/data/test_flag_source.json b/data/test_flag_source.json new file mode 100644 index 000000000..7542194d6 --- /dev/null +++ b/data/test_flag_source.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlH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2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\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cMSU3T\\\\n3nwWTACAMqw9IhV1vJLslivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"5237\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMyBHTVQifX0.DqCsfw.66XGdzcWDccaxbrr50iM3307nNc; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:23 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\"}}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/flag\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"message\\\": \\\"Source flagged for reply\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Content-Length\": \"44\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:42:24 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNCBHTVQifX0.DqCsgA.SVyzZA2RY19kTtoGn5aYIVKywvQ; HttpOnly; Path=/\"}, \"status\": 200}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msYfScR7Ev\\\\nnimAaXlbM/sWimFEHJWDS0r1Lmr7IvyobzbimMCbF35hy7hxphB2D30OnwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8VFUzVU9XUDZMN1BRQ1M2WE9NU0dMWEtTR1Ja\\\\nUDUzSVpaTDVRQ1VERERHSENTUFNEVEdRSjc0MzJYQUo3TlhSTzYyRTc1RUdPSjVK\\\\nQURaQzRTT05LQ09GQ0Q3QUhBQ05CQkdHSkxNST0+iQI/BBMBCgApBQJbvxrhAhsv\\\\nBQkB4VPfBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQGgMU7lwLt1QU3Q//\\\\nbnVgz689doE0MHQTk8jkPkpeA+dTipDd2n5sQ1kDHPmyq4rptO14zqxVZwXrVRKf\\\\nPEoS6GIrJltTO30EpR9BVWLQmmZ1B6atop3UvE71Bnu5TI2SWmGPiThg06316SV3\\\\nw+Jpr+Zu4+JWuUF+bhwmh9+Qkaald9Z1K2hv3CJXku+nSQK6OLgn0uebEngllSav\\\\nkv12MgJ1ZLffvydZxeiuZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2528\", \"Date\": \"Thu, 11 Oct 2018 09:42:24 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNCBHTVQifX0.DqCsgA.SVyzZA2RY19kTtoGn5aYIVKywvQ; HttpOnly; Path=/\"}}"} \ No newline at end of file diff --git a/data/test_get_all_replies.json b/data/test_get_all_replies.json new file mode 100644 index 000000000..cf632b3a1 --- /dev/null +++ b/data/test_get_all_replies.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NTo0MiBHTVQifX0.DqCvng.H3ANc_rMkG7UpTutU3DwmrKh4XI; HttpOnly; Path=/\", \"Content-Length\": \"1971\", \"Date\": \"Thu, 11 Oct 2018 09:55:42 GMT\"}, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/568e17fd-5492-4f99-af5d-9da8095892b0\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"568e17fd-5492-4f99-af5d-9da8095892b0\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_all_submissions.json b/data/test_get_all_submissions.json new file mode 100644 index 000000000..46d1c7f7d --- /dev/null +++ b/data/test_get_all_submissions.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"2049\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNSBHTVQifX0.DqCsgQ.6M0Yht05o8rM_UA6VhLI5iTlCyk; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:25 GMT\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/7445cda3-4bd0-4b73-9c7a-2e1c79c103fc/download\\\", \\n \\\"filename\\\": \\\"1-cephalopod_postage-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/7445cda3-4bd0-4b73-9c7a-2e1c79c103fc\\\", \\n \\\"uuid\\\": \\\"7445cda3-4bd0-4b73-9c7a-2e1c79c103fc\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/59a9fdfe-9c39-49a5-9d67-7e9a0fadef6d/download\\\", \\n \\\"filename\\\": \\\"2-cephalopod_postage-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/59a9fdfe-9c39-49a5-9d67-7e9a0fadef6d\\\", \\n \\\"uuid\\\": \\\"59a9fdfe-9c39-49a5-9d67-7e9a0fadef6d\\\"\\n }\\n ]\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_get_current_user.json b/data/test_get_current_user.json new file mode 100644 index 000000000..fd7326413 --- /dev/null +++ b/data/test_get_current_user.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/user\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T09:48:42.486824Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"645c7b1c-6d91-4950-b489-fd4192270c0f\\\"\\n}\\n\", \"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"151\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:48:43 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0ODo0MyBHTVQifX0.DqCt-w.CUELq9HqxVXpsj1BdhUiWnecokI; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file diff --git a/data/test_get_replies_from_source.json b/data/test_get_replies_from_source.json new file mode 100644 index 000000000..c528b520e --- /dev/null +++ b/data/test_get_replies_from_source.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nocturnal differential\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC K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zvKbPxwIAhpaeac/GQ8C8ypccWM3+bytRMcOjHhc/UuRYet\\\\nTnZro8x+ROWLshGaveIUD39WYfbFM3DLoY8jbuPGfhCrxgMU1D0tOOlAPRXiZ2pt\\\\nDN25yjh9iIA7w5Fjx3YByGf2YBlk0EPn87QJX5RWeOlehVTeOx25+J2Dqoo/oagN\\\\nsp2SDBC8YHUYen1JxAUSe072CWJ+Fpox9tL7JQ+B3n6qI7mgrGmZzxUc4Vrl5mjR\\\\nndTYI0zPTcRTxiQRRw4962QiwRaTP5PT6KshQNlLxjDZnB9sVkdpgX4FUY7udjIz\\\\n/H/5JEaEiqy7/wRY6pIOBWzxxhv/iClnH5BIgBzUvRhthZFd6WyI4tYSuY4vn7XK\\\\nywboxNqBauMB8qoIM6BpRGdiIaRmzfPEyxCyvm1DN03RjmjS5yVEIHB0vlLQgaU4\\\\n4gUvPqtNOJ0bDXv4QRHOGWBqYodRpDiW9NGbTguhkx4gF2zIq/T1VMWlF1IYEVUB\\\\npVkt0Y/lZs0ma4mjYt8u+7AQPl4UrLJ/n2gF0yGR+10JkAIChlfhSKmgTCRukLu9\\\\ngG4r/eMKIK2JQ95bshFcG6tqwVTLijGd/HqyTtpCJrgc6KS024MDaISBFz82ahgs\\\\n0/T9DHB0Xh6Il3pMPP7XqbMbKhcq2t+pXqWccvGYDYY=\\\\n=nw9g\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:48.829169Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"94daa38e-82d6-4efe-97f8-55b9659f03ea\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nineteen pyrite\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HXIBEACtKFiy1Ude/EM7G0tQGVNkRaiN5k2og+3N9I4vHsj/wfmOxMxG\\\\nia0UKGVcVwcObBuvNo6Fwfrrj3ufhGhTHhjObEQP2ISa3XGO3YfsHBBgAu7x0ymh\\\\n49MhmAncrXJ6KOMCgPXNHMi4zms0FN3YfAaj8yVTkOm/F8Qjeh8Dh+TfCnmV09W5\\\\nP6QLCaGKGj7wYLlLefk6yUCpH8C/Lx0TUtalOLWqp3H0MIZwKfPRAZB+y+XLyUKW\\\\ntkk2MW0wVZwxHX92kyqPqNF90E6yH9474lcIfFDadJg15QL63lRT2M0deOxiNF9C\\\\n2EsZE6a37TjNjRMNK50BiUE+lFca+1vHas46kB9EtIABUH/0shclbqBYlu3SXhMN\\\\n6ShhR6LzfTBt5wVzheGiu49xRNV5CYXA1dnZ5pPMdVvkIKbdKHLn+3ZRkH8mEyaG\\\\n8etC7WMJimdgZkOFrP6BiqmdQm2vgQ0x/ChAj6VvhjFvPMztlhyB4OMC7233uL9d\\\\ngOoq8AXFVJYhK86qrV7neGg38565IsMqIdI4nvs8wxX55ikHWCIq/4dfgJMaOhBz\\\\nRbO5RkPN0XbI7+xqfgurb/PugbSCrsD1jjGs0PVfb+nO32KDtY3hwQ3CvT3JNH8N\\\\nxf9thTBS3sQSZ2cu+D4SVNaLbimvXFaJ6OWlB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IC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:51.475725Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"06ffd7cd-4415-4642-a37a-58ec723b014e\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:53:08 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MzowOCBHTVQifX0.DqCvBA.ORkygLticceZrE9B9S1TWJGhVRg; HttpOnly; Path=/\", \"Content-Length\": \"5240\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:53:09 GMT\", \"Content-Length\": \"1003\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MzowOSBHTVQifX0.DqCvBQ.1q7mFym_1LTlKHUtjoRHMSXDVOw; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_reply_from_source.json b/data/test_get_reply_from_source.json new file mode 100644 index 000000000..c748584d2 --- /dev/null +++ b/data/test_get_reply_from_source.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:54:43 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"5240\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NDo0MyBHTVQifX0.DqCvYw.FJ13CKY_OLxiYpptXi8OyU2ik4s; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nocturnal differential\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HW4BEACqn0uMSspP8VDVFSxHPAw2pmXcl+G7hqjFx8H8BIIOE+BAWFvB\\\\nLNQaS78mpVhRHNs79cfyUwq0SsRYpjd2WNWGd41JpFqZYZ+S6Y6f4ZCbDCbaMaQ7\\\\neRayWd3lDJP/pyycZ6q7CWbcHYi3A41kTSWhDJD6xJL40sOGUWBMSsfAEKQnOHmw\\\\nF0G0qZOvGcuLyVXx7gAyDnknlFEypFLbEr2Fn7zVPjfqxEfVmYMHnkWTM37nIlVn\\\\nely3nH1GdzQzMU809GajxSsg27StuvyWCkOBitc+cXkNluPjQdGlgPSb4UaOB23C\\\\nptLkcPgeiUv9PT0D//KLYLXmnem7yOBZpuIV5py2f0oWbp9NiPeXoKqtxC15TIuW\\\\n848kT3BwY/yrNhZmGSC+o0rvetPHrykN2s/i7FISD6ajZj4+LxCjilTQknTBvA7s\\\\nminWpiPKpi1bXpLIrXhb2F2039dkM2tIW3TBrQw9enMFopH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Vkt0Y/lZs0ma4mjYt8u+7AQPl4UrLJ/n2gF0yGR+10JkAIChlfhSKmgTCRukLu9\\\\ngG4r/eMKIK2JQ95bshFcG6tqwVTLijGd/HqyTtpCJrgc6KS024MDaISBFz82ahgs\\\\n0/T9DHB0Xh6Il3pMPP7XqbMbKhcq2t+pXqWccvGYDYY=\\\\n=nw9g\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:48.829169Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"94daa38e-82d6-4efe-97f8-55b9659f03ea\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nineteen pyrite\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HXIBEACtKFiy1Ude/EM7G0tQGVNkRaiN5k2og+3N9I4vHsj/wfmOxMxG\\\\nia0UKGVcVwcObBuvNo6Fwfrrj3ufhGhTHhjObEQP2ISa3XGO3YfsHBBgAu7x0ymh\\\\n49MhmAncrXJ6KOMCgPXNHMi4zms0FN3YfAaj8yVTkOm/F8Qje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OEttcgVyuJdSU4uAQMozNwb046AxZ62UYvW93sgj0MaaO\\\\n7rcxZVY6tRfEYubAIr5nAfKj1P8mwzT0TTEMx6ezSstsrUZROf3ekXLKjdqh6MDL\\\\nJMRiLmGUKnXmwbCM0g7o7AZUVT+i9EdxYiepmAPfXkG3/CjeXBT6XXNdUGFR0TJH\\\\nMGa7E2VGZPyrdrhPkTRRgW1JDuY9wsmn/QsPZT2OylqLy/WbbRlnvoffRSBubfPF\\\\nOF0TRaj38/WRQIDrTo9YeD/2hO0I2yvmNMM9X1ZkLhE8clTnwGjjUKssRTuWBwg3\\\\nKGh33gPjo1sTkEQq3XTFiiKrrtjflbNFilVzIaFa++Jzq6xunyaVL7ECVszMaPAD\\\\n0TKRfY0IP9jXCZsmnYn4rUO/yWa8+P7tuAtmJv9Gq4k6lEK/iwkgRVtydt5zWIzU\\\\n0bUq6WT17kV2ElFWjEa4cR5U2G43pJKVU3wAxClPJeo=\\\\n=UDs5\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:51.475725Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"06ffd7cd-4415-4642-a37a-58ec723b014e\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:54:43 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"1003\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NDo0MyBHTVQifX0.DqCvYw.FJ13CKY_OLxiYpptXi8OyU2ik4s; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:54:44 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"449\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NDo0NCBHTVQifX0.DqCvZA.OeNEt2N5NqkGSujcUrEtvzGEsMs; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_get_single_source.json b/data/test_get_single_source.json new file mode 100644 index 000000000..8c719558f --- /dev/null +++ b/data/test_get_single_source.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNiBHTVQifX0.DqCsgg.20FXbqc0ZpuIdjZSVUK7-Rni2gw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:26 GMT\", \"Content-Length\": \"5236\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msYfScR7Ev\\\\nnimAaXlbM/sWimFEHJWDS0r1Lmr7IvyobzbimMCbF35hy7hxphB2D30OnwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8VFUzVU9XUDZMN1BRQ1M2WE9NU0dMWEtTR1Ja\\\\nUDUzSVpaTDVRQ1VERERHSENTUFNEVEdRSjc0MzJYQUo3TlhSTzYyRTc1RUdPSjVK\\\\nQURaQzRTT05LQ09GQ0Q3QUhBQ05CQkdHSkxNST0+iQI/BBMBCgApBQJbvxrhAhsv\\\\nBQkB4VPfBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQGgMU7lwLt1QU3Q//\\\\nbnVgz689doE0MHQTk8jkPkpeA+dTipDd2n5sQ1kDHPmyq4rptO14zqxVZwXrVRKf\\\\nPEoS6GIrJltTO30EpR9BVWLQmmZ1B6atop3UvE71Bnu5TI2SWmGPiThg06316SV3\\\\nw+Jpr+Zu4+JWuUF+bhwmh9+Qkaald9Z1K2hv3CJXku+nSQK6OLgn0uebEngllSav\\\\nkv12MgJ1ZLffvydZxeiuZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+sV42niOI7009\\\\n5Dg1LwNrDloPp1So5gAskKshbOQ97rss5OhTC7DW1NsHlqdJLS3JcGuDK3H14fnJ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0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGa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aald9Z1K2hv3CJXku+nSQK6OLgn0uebEngllSav\\\\nkv12MgJ1ZLffvydZxeiuZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNiBHTVQifX0.DqCsgg.20FXbqc0ZpuIdjZSVUK7-Rni2gw; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:26 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2528\"}}"} \ No newline at end of file diff --git a/data/test_get_single_source_from_string.json b/data/test_get_single_source_from_string.json new file mode 100644 index 000000000..d8eda408e --- /dev/null +++ b/data/test_get_single_source_from_string.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:27 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNyBHTVQifX0.DqCsgw.KQO_xqUpwAi1vKqLg0lkm18C-Fw; HttpOnly; Path=/\", \"Content-Length\": \"5236\"}, \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihx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KdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993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bdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2528\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:27 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNyBHTVQifX0.DqCsgw.KQO_xqUpwAi1vKqLg0lkm18C-Fw; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihx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KdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_sources.json b/data/test_get_sources.json new file mode 100644 index 000000000..7c3fc74fa --- /dev/null +++ b/data/test_get_sources.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb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hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/M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ivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyOCBHTVQifX0.DqCshA.L_5t9P-IO-dOkXMHMKsdaO1mnig; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:28 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"5236\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_submission.json b/data/test_get_submission.json new file mode 100644 index 000000000..4dbcfd63f --- /dev/null +++ b/data/test_get_submission.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Content-Length\": \"5236\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:29 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyOSBHTVQifX0.DqCshQ.pVvsrom2nWnxn9TzYBiZe-vLbSs; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBH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\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfG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Ua+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyOSBHTVQifX0.DqCshQ.pVvsrom2nWnxn9TzYBiZe-vLbSs; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:29 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"1035\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Content-Length\": \"467\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:42:30 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMCBHTVQifX0.DqCshg.iThLayqhlWsZ6xaJnsdzJMs3Ne4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_get_submission_from_string.json b/data/test_get_submission_from_string.json new file mode 100644 index 000000000..7a0fd145c --- /dev/null +++ b/data/test_get_submission_from_string.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Content-Length\": \"5236\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:31 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMSBHTVQifX0.DqCshw.cyggrdw8ojv2X9wh308YdP0rxnc; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msYfScR7Ev\\\\nnimAaXlbM/sWimFEHJWDS0r1Lmr7IvyobzbimMCbF35hy7hxphB2D30OnwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8VFUzVU9XUDZMN1BRQ1M2WE9NU0dMWEtTR1Ja\\\\nUDUzSVpaTDVRQ1VERERHSENTUFNEVEdRSjc0MzJYQUo3TlhSTzYyRTc1RUdPSjVK\\\\nQURaQzRTT05LQ09GQ0Q3QUhBQ05CQkdHSkxNST0+iQI/BBMBCgApBQJbvxrhAhsv\\\\nBQkB4VPfBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQGgMU7lwLt1QU3Q//\\\\nbnVgz689doE0MHQTk8jkPkpeA+dTipDd2n5sQ1kDHPmyq4rptO14zqxVZwXrVRKf\\\\nPEoS6GIrJltTO30EpR9BVWLQmmZ1B6atop3UvE71Bnu5TI2SWmGPiThg06316SV3\\\\nw+Jpr+Zu4+JWuUF+bhwmh9+Qkaald9Z1K2hv3CJXku+nSQK6OLgn0uebEngllSav\\\\nkv12MgJ1ZLffvydZxeiuZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+sV42niOI7009\\\\n5Dg1LwNrDloP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\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:31 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMSBHTVQifX0.DqCshw.cyggrdw8ojv2X9wh308YdP0rxnc; HttpOnly; Path=/\", \"Content-Length\": \"1035\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:32 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"467\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMiBHTVQifX0.DqCsiA.9r2is49W5HKWwPk__Gpn49ymXA4; HttpOnly; Path=/\"}, \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_submissions.json b/data/test_get_submissions.json new file mode 100644 index 000000000..8f8fbe52b --- /dev/null +++ b/data/test_get_submissions.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMyBHTVQifX0.DqCsiQ.GZRTsp11kDQJu2T90OF8c20aMY4; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Content-Length\": \"5236\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:42:33 GMT\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7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9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+sV42niOI7009\\\\n5Dg1LwNrDloPp1So5gAskKshbOQ97rss5OhTC7DW1NsHlqdJLS3JcGuDK3H14fnJ\\\\nfwIklnMv8VConUt6O7umI/OaVaEmjLGUoucVdxxzs3AOmoXlFASGF8vfubm3QWni\\\\nIP/KIt12CTV+pEOXRkJH4797emmx3f9VV0GuRsLju3I+eVIvpa4oDSIwwQARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UExRNFA3NVo3TDc1MkRPV0I2TE9ZUk9NSEhP\\\\nRUwzN1RGTTNCUjVVNFBBUlozUlg3WFBJWlNUNVVBWFBISkJZM1VZTEdJSVY3VVNS\\\\nQURFRTMyU1VaUlYzWFFNQzc3M0JBSVNJWVZCST0+iQI/BBMBCgApBQJbvxrkAhsv\\\\nBQkB4VPcBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQgimLLlolhdx9/hAA\\\\nim7dinkVkDETUgjAi21b/s4bzR4plSxYEG49Jopruv4kEQf133l8OHmHIUcMSU3T\\\\n3nwWTACAMqw9IhV1vJLslivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:42:33 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMyBHTVQifX0.DqCsiQ.GZRTsp11kDQJu2T90OF8c20aMY4; HttpOnly; Path=/\", \"Content-Length\": \"1035\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_wrong_submissions.json b/data/test_get_wrong_submissions.json new file mode 100644 index 000000000..d2ca2858b --- /dev/null +++ b/data/test_get_wrong_submissions.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msY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PgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2ea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IHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:34 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"5236\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNCBHTVQifX0.DqCsig.d-dD1_UDElqeAQBZ9FmzHEtCVjo; HttpOnly; Path=/\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/rofl-missing/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 404, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNSBHTVQifX0.DqCsiw.DEH6ebEPcsbLK9H5adCZ6XjyK1A; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"166\", \"Date\": \"Thu, 11 Oct 2018 09:42:35 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_reply_source.json b/data/test_reply_source.json new file mode 100644 index 000000000..ff66137db --- /dev/null +++ b/data/test_reply_source.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"pyrrhic bullfinch\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HCUBEAC91OgTBsFOm+JJGl7i+jS/oR6ARJM88227D0YjqHJgoCTriTbt\\\\nrVcq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UaFgr8Ey7pO2VoW5da9mjL6a\\\\nMU9BqK5QaJEklcSuV2phTJZaczE1qA6t7tEbj+91g8HFU80/70hrMXDKjT4YkjEH\\\\nZ627aVJCf5b8/sEDqJS6yrBVl9U8voqtk0/XrCEx+1oD+RsJfTa/ELA+NiUk1kMx\\\\nMss6ypf7j9JfqYs1jqrIA+NKVNiAUy9J8yFZ5VEGHPwxLLJX3lnooxjuxg52oI9V\\\\nn2rEzf3GNXA7+xGqvMCeetHUFONUWE56OCgySULi3ptmQlraQI66DWMn/QBMYrFF\\\\nGE7CA3Vki4JnvX5GwbbKhpOqef/xJsInHWdfZZFT21P45vF2s4fvAkAwjVekur14\\\\nKIbe7kbWYuQBG2hhC6TWd9M6Gwta0uQWTz6UBB+gz7RoRqsDKNU1dlHmbQLjClr6\\\\niTC+NNPrKqzsE62+LUv5srmTuMCRTSPwWhqCKH7Av9FjqUPiWo9Yu8e/oJZcRl72\\\\nG863e0wI2vaPUjxbd2jCGs+WxHACWu/2/CcF+4ZqUVrzdxockIRJQEz4a0L8EGuc\\\\nLqzFDGlTiJCPb6umd5aoRyU3eSKAb1fhhZyUt/DRTS0=\\\\n=l0jn\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:47:19.113278Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\", \\n \\\"uuid\\\": \\\"7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"holier-than-thou naturalness\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HCkBEAC2NvMI+VEwhOK4eu9kbAya+1yhZ08v5+DUi+C6vyj5CsBuFpeV\\\\nH3yDGmFjv9I7mY+1InJYS91BnjWKT65XbYqP/NKHQ9Jljbx/wPxSJcWsw45qugez\\\\nAuDUFlANGJsGVTnMJBquJQnoO5Pl/RmMYMKO2RTN1nymhoNismXjZz/wHSvpy571\\\\np06YJsXA6Uq/xn2G82/OskoM1tcJRMwL53nq9rLUqTdhF4pWQp7Nh4p3/2apZbQW\\\\nRUS5/4JLjaIReTFt4C20q7wnqRtLGVco9CsSNiOjcDhpfeL9rl2nf+SzKSEyJQzC\\\\naEXCtGvMtYtGR89A2fzUNaHhfuKHaWX4jeo62pLkIbhBBB40dZcZ6NWkTlBo37yC\\\\n6gJfFTX6O6P4bMfItyVHSa34c3NKac6WqeTlNteZlGopLyBIiJtpgc1C7Kf2KBH9\\\\nEESCfpkrQqtpVmW63n2cvXnm2WAZJ8oJV2jZk9XPfz0mpGgPM580ScAgVl314yK6\\\\nqmcjtab0wFIqnU4c51qWHzdBiVZcLKVn/rtI7wPqdKvOb1OnXYPtvUSJgHpoR6Sc\\\\nLMuiroY4XS9kpLAoROvK1ciyzBd+J8djYgwjyAsQ6og+/x483PDFkl6zOk1+84xP\\\\nIfLZtzgIZYDsH7VnPV+mWt+mGeBkDP9Ezqqswhbpdeb4ctqz8zuBvnb0tQARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8RkhHVzM3Slo2NFk0NkRIVlNJRFNQNk43N1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\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8\\\", \\n \\\"uuid\\\": \\\"425d1364-e30d-405d-8767-81274ab8e7b8\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MDowNCBHTVQifX0.DqCuTA.yN6ji-BR5TcdHjoWm3sRrFYXhgU; HttpOnly; Path=/\", \"Content-Length\": \"5248\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:50:04 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\", \"body\": \"{\\\\\"reply\\\\\": \\\\\"-----BEGIN PGP MESSAGE-----\\\\\\\\n\\\\\\\\nhQIMA/uCql0ybaddAQ//dg2iojyiyXBaUzKbPaL9+FlEEvraxXO+BbhcsbEdLI5E\\\\\\\\nKYxP5xb1LEOdaJjUcQaPjSARPnFbLzq3vsafZCBrEHtMWnSWxEpxbI1/DO+/Wbk1\\\\\\\\nT+ZVltaAdOIulfuMlIlL4rVCbprg+QUQbsbtIIOFdXpvuS1kQdv+F/sfYsFQanQw\\\\\\\\nV6u/yz3hgyymUyoBfZOXUfpFQ/t759s3rt3OGvwTzOx6o8Q3X+cKypwYsGsHzAUr\\\\\\\\n/N2Ggy6hYVzDj1czjtgUF2EWyKKfTN2RO9y+E0PYnu7C6QN41dx4yPsXFq16kOWC\\\\\\\\nLDyeXW2A/3/fGqp9176V4DRHMkUB6WkkXnekJBiyar1rG7WJ09KNdXGKJw6tjlqT\\\\\\\\nz4mnjgkZopSbuwJJgs+RZFddpGU31PSQg3ODWZRmSQbL/7lFtsJCY0yFjGoEdJFw\\\\\\\\npg5nJ6uOQN6bWPdM47nEPweFgNBIPmQccm0ayewaxvpIgTH+okBlLMPxnDg51vaA\\\\\\\\nF7dzZP4SdNQuBkHKq3DW7tu21+haa5YcjY5vJry9o5Fu9qJJadiI8Cg0JJqTVsUs\\\\\\\\n7Vu4eK1F9popI5hzdRBvBIdNB4LlIJiYmMKxD7l5yyOXSdoyINPU04PwxM3yO6QH\\\\\\\\n5Uw7gVNYCvgKSHAvfFnYAjPSd1m7CPW/aI2EjIHMBf+8FEyyWdHduPCMHZhUZ5XS\\\\\\\\nVAFdU++LS7PKxIFsXKtkHSMmO+GRfI/+SrVmGfw1YJbSmhaRAPk5ChqS7RQMgz/j\\\\\\\\nt+mAINV0vHUNAJkMW/QZXgdVw+eca0ITs/1u3fKsBlmQNv4Efg==\\\\\\\\n=686S\\\\\\\\n-----END PGP MESSAGE-----\\\\\\\\n\\\\\\\\n\\\\\"}\"}',), 2)": "{\"status\": 201, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Your reply has been stored\\\"\\n}\\n\", \"headers\": {\"Content-Length\": \"46\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:50:05 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MDowNSBHTVQifX0.DqCuTQ.aO1H1VTbl7JXbedGN79hyP9M4tE; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file diff --git a/data/test_star_add_remove.json b/data/test_star_add_remove.json new file mode 100644 index 000000000..49a99ed42 --- /dev/null +++ b/data/test_star_add_remove.json @@ -0,0 +1 @@ +{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism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CQoLBBYCAwECHgECF4AACgkQGgMU7lwLt1QU3Q//\\\\nbnVgz689doE0MHQTk8jkPkpeA+dTipDd2n5sQ1kDHPmyq4rptO14zqxVZwXrVRKf\\\\nPEoS6GIrJltTO30EpR9BVWLQmmZ1B6atop3UvE71Bnu5TI2SWmGPiThg06316SV3\\\\nw+Jpr+Zu4+JWuUF+bhwmh9+Qkaald9Z1K2hv3CJXku+nSQK6OLgn0uebEngllSav\\\\nkv12MgJ1ZLffvydZxeiuZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+sV42niOI7009\\\\n5Dg1LwNrDloPp1So5gAskKshbOQ97rss5OhTC7DW1NsHlqdJLS3JcGuDK3H14fnJ\\\\nfwIklnMv8VConUt6O7umI/OaVaEmjLGUoucVdxxzs3AOmoXlFASGF8vfubm3QWni\\\\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\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:35 GMT\", \"Content-Length\": \"5236\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNSBHTVQifX0.DqCsiw.DEH6ebEPcsbLK9H5adCZ6XjyK1A; HttpOnly; Path=/\"}}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"status\": 201, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:36 GMT\", \"Content-Length\": \"30\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNiBHTVQifX0.DqCsjA.zsGuf7s5PhVGgAUV4HrDRtCJA4Q; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"message\\\": \\\"Star added\\\"\\n}\\n\"}", "(('{\"method\": \"delete\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:37 GMT\", \"Content-Length\": \"32\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNyBHTVQifX0.DqCsjQ._M3tpW647dvYvitT7zMcEovWUBI; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"message\\\": \\\"Star removed\\\"\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 4)": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Content-Length\": \"5236\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:42:37 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNyBHTVQifX0.DqCsjQ._M3tpW647dvYvitT7zMcEovWUBI; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msYfScR7Ev\\\\nnimAaXlbM/sWimFEHJWDS0r1Lmr7IvyobzbimMCbF35hy7hxphB2D30OnwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8VFUzVU9XUDZMN1BRQ1M2WE9NU0dMWEtTR1Ja\\\\nUDUzSVpaTDVRQ1VERERHSENTUFNEVEdRSjc0MzJYQUo3TlhSTzYyRTc1RUdPSjVK\\\\nQURaQzRTT05LQ09GQ0Q3QUhBQ05CQkdHSkxNST0+iQI/BBMBCgApBQJbvxrhAhsv\\\\nBQkB4VPfBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQGgMU7lwLt1QU3Q//\\\\nbnVgz689doE0MHQTk8jkPkpeA+dTipDd2n5sQ1kDHPmyq4rptO14zqxVZwXrVRKf\\\\nPEoS6GIrJltTO30EpR9BVWLQmmZ1B6atop3UvE71Bnu5TI2SWmGPiThg06316SV3\\\\nw+Jpr+Zu4+JWuUF+bhwmh9+Qkaald9Z1K2hv3CJXku+nSQK6OLgn0uebEngllSav\\\\nkv12MgJ1ZLffvydZxeiuZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+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2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/tests/test_apiproxy.py b/tests/test_apiproxy.py new file mode 100644 index 000000000..e86e7e650 --- /dev/null +++ b/tests/test_apiproxy.py @@ -0,0 +1,233 @@ +from pprint import pprint +import os +import time +import json +import hashlib +import shutil +import tempfile +import unittest +from sdclientapi import * + +from .utils import * +import pyotp + + +def load_auth(): + "Helper function to load token" + if os.path.exists("testtoken.json"): + with open("testtoken.json") as fobj: + return json.load(fobj) + return None + + +def save_auth(token): + with open("testtoken.json", "w") as fobj: + json.dump(token, fobj) + + +class TestAPIProxy(unittest.TestCase): + @dastollervey_datasaver + def setUp(self): + self.totp = pyotp.TOTP("JHCOGO7VCER3EJ4L") + self.username = "journalist" + self.password = "correct horse battery staple profanity oil chewy" + self.server = "http://localhost:8081/" + self.api = APIProxy(self.server, self.username, self.password, str(self.totp.now())) + for i in range(3): + try: + self.api.authenticate() + except BaseError: + token = load_auth() + if token: + self.api.token = token + self.api.update_auth_header() + break + time.sleep(31) + + save_auth(self.api.token) + break + + def test_api_auth(self): + self.assertTrue(self.api.token) + + @dastollervey_datasaver + def test_get_sources(self): + sources = self.api.get_sources() + self.assertEqual(len(sources), 2) + + @dastollervey_datasaver + def test_star_add_remove(self): + s = self.api.get_sources()[0] + self.assertTrue(self.api.add_star(s)) + self.assertTrue(self.api.remove_star(s)) + for source in self.api.get_sources(): + if source.uuid == s.uuid: + self.assertFalse(source.is_starred) + + @dastollervey_datasaver + def test_get_single_source(self): + s = self.api.get_sources()[0] + # Now we will try to get the same source again + s2 = self.api.get_source(s) + + self.assertEqual(s.journalist_designation, s2.journalist_designation) + self.assertEqual(s.uuid, s2.uuid) + + @dastollervey_datasaver + def test_get_single_source_from_string(self): + s = self.api.get_sources()[0] + # Now we will try to get the same source again using uuid + s2 = self.api.get_source_from_string(s.uuid) + + self.assertEqual(s.journalist_designation, s2.journalist_designation) + self.assertEqual(s.uuid, s2.uuid) + + @dastollervey_datasaver + def test_failed_single_source(self): + with self.assertRaises(WrongUUIDError): + self.api.get_source(Source(uuid="not there")) + + @dastollervey_datasaver + def test_get_submissions(self): + s = self.api.get_sources()[0] + + subs = self.api.get_submissions(s) + self.assertEqual(len(subs), 2) + + @dastollervey_datasaver + def test_get_submission(self): + s = self.api.get_sources()[0] + + subs = self.api.get_submissions(s) + sub = self.api.get_submission(subs[0]) + self.assertEqual(sub.filename, subs[0].filename) + + @dastollervey_datasaver + def test_get_submission_from_string(self): + s = self.api.get_sources()[0] + + subs = self.api.get_submissions(s) + sub = self.api.get_submission_from_string(subs[0].uuid, s.uuid) + self.assertEqual(sub.filename, subs[0].filename) + + @dastollervey_datasaver + def test_get_wrong_submissions(self): + s = self.api.get_sources()[0] + s.submissions_url = "/api/v1/sources/rofl-missing/submissions/2334" + s.uuid = "rofl-missing" + with self.assertRaises(WrongUUIDError): + self.api.get_submissions(s) + + @dastollervey_datasaver + def test_get_all_submissions(self): + subs = self.api.get_all_submissions() + self.assertEqual(len(subs), 4) + + @dastollervey_datasaver + def test_flag_source(self): + s = self.api.get_sources()[0] + self.assertTrue(self.api.flag_source(s)) + # Now we will try to get the same source again + s2 = self.api.get_source(s) + self.assertTrue(s2.is_flagged) + + @dastollervey_datasaver + def test_delete_source(self): + s = self.api.get_sources()[0] + self.assertTrue(self.api.delete_source(s)) + + # Now there should be one source left + sources = self.api.get_sources() + self.assertEqual(len(sources), 1) + + @dastollervey_datasaver + def test_delete_source_from_string(self): + s = self.api.get_sources()[0] + self.assertTrue(self.api.delete_source_from_string(s.uuid)) + + # Now there should be one source left + sources = self.api.get_sources() + self.assertEqual(len(sources), 1) + + @dastollervey_datasaver + def test_delete_submission(self): + subs = self.api.get_all_submissions() + self.assertTrue(self.api.delete_submission(subs[0])) + new_subs = self.api.get_all_submissions() + # We now should have 3 submissions + self.assertEqual(len(new_subs), 3) + + # Let us make sure that sub[0] is not there + for s in new_subs: + self.assertNotEqual(s.uuid, subs[0].uuid) + + @dastollervey_datasaver + def test_delete_submission_from_string(self): + s = self.api.get_sources()[0] + + subs = self.api.get_submissions(s) + + self.assertTrue(self.api.delete_submission(subs[0])) + new_subs = self.api.get_all_submissions() + # We now should have 3 submissions + self.assertEqual(len(new_subs), 3) + + # Let us make sure that sub[0] is not there + for s in new_subs: + self.assertNotEqual(s.uuid, subs[0].uuid) + + @dastollervey_datasaver + def test_get_current_user(self): + user = self.api.get_current_user() + self.assertTrue(user["is_admin"]) + self.assertEqual(user["username"], "journalist") + + @dastollervey_datasaver + def test_error_unencrypted_reply(self): + s = self.api.get_sources()[0] + with self.assertRaises(ReplyError) as err: + self.api.reply_source(s, "hello") + + self.assertEqual(err.exception.msg, "You must encrypt replies client side") + + @dastollervey_datasaver + def test_reply_source(self): + s = self.api.get_sources()[0] + dirname = os.path.dirname(__file__) + with open(os.path.join(dirname, "encrypted_msg.asc")) as fobj: + data = fobj.read() + + self.assertTrue(self.api.reply_source(s, data)) + + @dastollervey_datasaver + def test_get_replies_from_source(self): + s = self.api.get_sources()[0] + replies = self.api.get_replies_from_source(s) + self.assertEqual(len(replies), 2) + + @dastollervey_datasaver + def test_get_reply_from_source(self): + s = self.api.get_sources()[0] + replies = self.api.get_replies_from_source(s) + reply = replies[0] + + r = self.api.get_reply_from_source(s, reply.uuid) + + self.assertEqual(reply.filename, r.filename) + self.assertEqual(reply.size, r.size) + self.assertEqual(reply.reply_url, r.reply_url) + self.assertEqual(reply.journalist_username, r.journalist_username) + + @dastollervey_datasaver + def test_get_all_replies(self): + replies = self.api.get_all_replies() + self.assertEqual(len(replies), 4) + + @dastollervey_datasaver + def test_delete_reply(self): + r = self.api.get_all_replies()[0] + + self.assertTrue(self.api.delete_reply(r)) + + # We deleted one, so there must be 3 replies left + self.assertEqual(len(self.api.get_all_replies()), 3) \ No newline at end of file From 208530ac1168f40513f0220d0f9ba2226c5557b8 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 11:06:36 -0400 Subject: [PATCH 06/14] Updates the proxy vmname based on a configuration file The default proxy vmname is sd-journalist. If you want to override it, add a file at ``/etc/sd-sdk.conf`` with the following details: [proxy] name = proxy-debian The above example updates the proxy vmname to be ``proxy-debian``. --- sdclientapi/proxyapi.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sdclientapi/proxyapi.py b/sdclientapi/proxyapi.py index 37c4c7f26..51f2bac38 100644 --- a/sdclientapi/proxyapi.py +++ b/sdclientapi/proxyapi.py @@ -1,6 +1,7 @@ from pprint import pprint import os import json +import configparser from subprocess import PIPE, Popen from .sdlocalobjects import * @@ -8,12 +9,23 @@ from typing import Optional, Dict, List, Tuple +proxyvmname = "sd-journalist" + + def json_query(data): """ Takes a json based query and passes to the network proxy. Returns the JSON output from the proxy. """ - proxyvmname = "proxy-debian" + global proxyvmname + config = configparser.ConfigParser() + try: + if os.path.exists("/etc/sd-sdk.conf"): + config.read("/etc/sd-sdk.conf") + proxyvmname = config["proxy"]["name"] + except: + pass # We already have a default name + p = Popen( ["/usr/lib/qubes/qrexec-client-vm", proxyvmname, "securedrop.Proxy"], stdin=PIPE, From 5e9fabd028f261d3230e2cba8bc1ef4886aa345f Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 11:10:06 -0400 Subject: [PATCH 07/14] Adds methods and tests for downloading reply and submission We have two methods to download replies and submissions --- data/test_download_reply.json | 1 + data/test_download_submission.json | 1 + sdclientapi/proxyapi.py | 72 ++++++++++++++++++++++++++++++ tests/test_apiproxy.py | 20 ++++++++- 4 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 data/test_download_reply.json create mode 100644 data/test_download_submission.json diff --git a/data/test_download_reply.json b/data/test_download_reply.json new file mode 100644 index 000000000..55f6fc408 --- /dev/null +++ b/data/test_download_reply.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-longitudinal_cellist-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0/replies/f315e4b8-e2d3-4b58-a8d1-131ff5da6f42\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0\\\", \\n \\\"uuid\\\": \\\"f315e4b8-e2d3-4b58-a8d1-131ff5da6f42\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-longitudinal_cellist-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0/replies/ab5a6a0f-669b-4fb9-acbb-d0d9aec3feda\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0\\\", \\n \\\"uuid\\\": \\\"ab5a6a0f-669b-4fb9-acbb-d0d9aec3feda\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-indie_second-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483/replies/f42ec66c-492f-4170-910b-4b1963256e14\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483\\\", \\n \\\"uuid\\\": \\\"f42ec66c-492f-4170-910b-4b1963256e14\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-indie_second-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483/replies/0a142d8f-55f3-4476-a2f0-eb7bade55e8a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483\\\", \\n \\\"uuid\\\": \\\"0a142d8f-55f3-4476-a2f0-eb7bade55e8a\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNjo0OToxNiBHTVQifX0.DqD0bA.0DwUB-J-sRcCsidgVSwRODc-m2E; HttpOnly; Path=/\", \"Content-Length\": \"1961\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 14:49:16 GMT\"}}", "(('{\"method\": \"GET\", \"path_query\": \"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0/replies/f315e4b8-e2d3-4b58-a8d1-131ff5da6f42/download\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"body\": \"{\\\"filename\\\": \\\"67a6ada8-9522-4ec3-9c6f-75e61a3ceef7\\\"}\", \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Content-Disposition\": \"attachment; filename=3-longitudinal_cellist-reply.gpg\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNjo0OToxNiBHTVQifX0.DqD0bA.0DwUB-J-sRcCsidgVSwRODc-m2E; HttpOnly; Path=/\", \"Etag\": \"\\\"sha256:a69b2f47c0ec8e8b84b4ee0d35cad39747e0008ba2c0081a5993602d56a80b07\\\"\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 14:49:16 GMT\", \"Vary\": \"Cookie\", \"Expires\": \"Fri, 12 Oct 2018 02:49:16 GMT\", \"X-Origin-Content-Type\": \"application/json\", \"Cache-Control\": \"public, max-age=43200\", \"Content-Length\": \"1116\", \"Last-Modified\": \"Thu, 11 Oct 2018 09:57:21 GMT\"}}"} \ No newline at end of file diff --git a/data/test_download_submission.json b/data/test_download_submission.json new file mode 100644 index 000000000..a62c31e49 --- /dev/null +++ b/data/test_download_submission.json @@ -0,0 +1 @@ +{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNzowMToxMiBHTVQifX0.DqD3OA.EW-4IatzGImxMbvR8lrYi4eeHjY; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 15:01:12 GMT\", \"Content-Length\": \"2059\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6/download\\\", \\n \\\"filename\\\": \\\"1-electric_cashbox-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\", \\n \\\"uuid\\\": \\\"cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/00fb8e3b-90e5-485a-b8cf-a40fce155292/download\\\", \\n \\\"filename\\\": \\\"2-electric_cashbox-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/00fb8e3b-90e5-485a-b8cf-a40fce155292\\\", \\n \\\"uuid\\\": \\\"00fb8e3b-90e5-485a-b8cf-a40fce155292\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/1f8db8de-6ed9-46ed-9671-8d1ab911d39e/download\\\", \\n \\\"filename\\\": \\\"1-paramilitary_submariner-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/1f8db8de-6ed9-46ed-9671-8d1ab911d39e\\\", \\n \\\"uuid\\\": \\\"1f8db8de-6ed9-46ed-9671-8d1ab911d39e\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/956e6c07-8934-4c47-9f2f-1e3d65c5e375/download\\\", \\n \\\"filename\\\": \\\"2-paramilitary_submariner-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/956e6c07-8934-4c47-9f2f-1e3d65c5e375\\\", \\n \\\"uuid\\\": \\\"956e6c07-8934-4c47-9f2f-1e3d65c5e375\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6/download\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"headers\": {\"Cache-Control\": \"public, max-age=43200\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNzowMToxMiBHTVQifX0.DqD3OA.EW-4IatzGImxMbvR8lrYi4eeHjY; HttpOnly; Path=/\", \"Content-Length\": \"604\", \"Date\": \"Thu, 11 Oct 2018 15:01:12 GMT\", \"Last-Modified\": \"Thu, 11 Oct 2018 14:59:38 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Etag\": \"\\\"sha256:965d1cc795e682dda26e08c3ffceb05d90fcad5867008ea9041c2f6b51f40bcf\\\"\", \"Vary\": \"Cookie\", \"Expires\": \"Fri, 12 Oct 2018 03:01:12 GMT\", \"X-Origin-Content-Type\": \"application/json\", \"Content-Disposition\": \"attachment; filename=1-electric_cashbox-msg.gpg\"}, \"body\": \"{\\\"filename\\\": \\\"cae6efb7-3927-4274-98cf-a8c4f56b08be\\\"}\", \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6/download\\\", \\n \\\"filename\\\": \\\"1-electric_cashbox-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\", \\n \\\"uuid\\\": \\\"cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\"\\n}\\n\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 15:01:13 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"466\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNzowMToxMyBHTVQifX0.DqD3OQ.kR00EWVU_q29n_E1yF5M3uhu5-4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file diff --git a/sdclientapi/proxyapi.py b/sdclientapi/proxyapi.py index 51f2bac38..d4efa4b33 100644 --- a/sdclientapi/proxyapi.py +++ b/sdclientapi/proxyapi.py @@ -627,3 +627,75 @@ def delete_reply(self, reply: Reply) -> bool: return True # We should never reach here return False + + def download_submission(self, submission: Submission) -> Tuple[str, str]: + """ + Downloads the submission object from the server. + + :param submission: Submission object we want to update. + :returns: Tuple of sha256sum, temporary filename + """ + global proxyvmname + source_uuid = submission.source_url.split("/")[-1] + path_query = "/api/v1/sources/{}/submissions/{}/download".format( + source_uuid, submission.uuid + ) + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing submission {}".format(submission.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + etag = json.loads(res["headers"]["Etag"]) + + filename = os.path.join( + "/home/user/QubesIncoming/", proxyvmname, data["filename"] + ) + + return etag[7:], filename + + def download_reply(self, reply: Reply) -> Tuple[str, str]: + """ + Downloads the reply object from the server. + + :param reply: Reply object we want to update. + :returns: Tuple of sha256sum, temporary filename + """ + global proxyvmname + source_uuid = reply.source_url.split("/")[-1] + path_query = "/api/v1/sources/{}/replies/{}/download".format( + source_uuid, reply.uuid + ) + method = "GET" + + data = {"method": method, "path_query": path_query, "headers": self.auth_header} + + try: + res = json.loads(json_query(json.dumps(data))) + + if res["status"] == 404: + raise WrongUUIDError("Missing reply {}".format(reply.uuid)) + data = json.loads(res["body"]) + except json.decoder.JSONDecodeError: + raise BaseError("Error in parsing JSON") + + if "error" in data: + raise AuthError(data["error"]) + + etag = json.loads(res["headers"]["Etag"]) + + filename = os.path.join( + "/home/user/QubesIncoming/", proxyvmname, data["filename"] + ) + + return etag[7:], filename diff --git a/tests/test_apiproxy.py b/tests/test_apiproxy.py index e86e7e650..7b08dbe63 100644 --- a/tests/test_apiproxy.py +++ b/tests/test_apiproxy.py @@ -230,4 +230,22 @@ def test_delete_reply(self): self.assertTrue(self.api.delete_reply(r)) # We deleted one, so there must be 3 replies left - self.assertEqual(len(self.api.get_all_replies()), 3) \ No newline at end of file + self.assertEqual(len(self.api.get_all_replies()), 3) + + @dastollervey_datasaver + def test_download_reply(self): + r = self.api.get_all_replies()[0] + + etag, filepath = self.api.download_reply(r) + + @dastollervey_datasaver + def test_download_submission(self): + s = self.api.get_all_submissions()[0] + + self.assertFalse(s.is_read) + + etag, filepath = self.api.download_submission(s) + + # Now the submission should have is_read as True. + s = self.api.get_submission(s) + self.assertTrue(s.is_read) From 0598e6b8d6f9e951c7925c41351347a7b19d45dd Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 11:13:09 -0400 Subject: [PATCH 08/14] Moves two test helper functions into utils --- tests/test_api.py | 14 +------------- tests/test_apiproxy.py | 13 ------------- tests/utils.py | 13 +++++++++++++ 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 795344eba..193b09a31 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -7,24 +7,12 @@ import tempfile import unittest from sdclientapi import * +from .utils import * import vcr import pyotp -def load_auth(): - "Helper function to load token" - if os.path.exists("testtoken.json"): - with open("testtoken.json") as fobj: - return json.load(fobj) - return None - - -def save_auth(token): - with open("testtoken.json", "w") as fobj: - json.dump(token, fobj) - - class TestAPI(unittest.TestCase): @vcr.use_cassette("data/test-setup.yml") def setUp(self): diff --git a/tests/test_apiproxy.py b/tests/test_apiproxy.py index 7b08dbe63..9e6b0ece6 100644 --- a/tests/test_apiproxy.py +++ b/tests/test_apiproxy.py @@ -12,19 +12,6 @@ import pyotp -def load_auth(): - "Helper function to load token" - if os.path.exists("testtoken.json"): - with open("testtoken.json") as fobj: - return json.load(fobj) - return None - - -def save_auth(token): - with open("testtoken.json", "w") as fobj: - json.dump(token, fobj) - - class TestAPIProxy(unittest.TestCase): @dastollervey_datasaver def setUp(self): diff --git a/tests/utils.py b/tests/utils.py index e2097781a..d30c47bd8 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -89,3 +89,16 @@ def wrapper(*args, **kwargs): return result return wrapper + + +def load_auth(): + "Helper function to load token" + if os.path.exists("testtoken.json"): + with open("testtoken.json") as fobj: + return json.load(fobj) + return None + + +def save_auth(token): + with open("testtoken.json", "w") as fobj: + json.dump(token, fobj) From 3fc56a80764d6242aa0cc20dd43a12d0144c20ff Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 11:26:25 -0400 Subject: [PATCH 09/14] Fixes the test run using pipenv --- tests/test_api.py | 2 +- tests/test_apiproxy.py | 2 +- tests/{utils.py => utils/__init__.py} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename tests/{utils.py => utils/__init__.py} (100%) diff --git a/tests/test_api.py b/tests/test_api.py index 193b09a31..6dbfc0d79 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -7,7 +7,7 @@ import tempfile import unittest from sdclientapi import * -from .utils import * +from utils import * import vcr import pyotp diff --git a/tests/test_apiproxy.py b/tests/test_apiproxy.py index 9e6b0ece6..0cb6787b4 100644 --- a/tests/test_apiproxy.py +++ b/tests/test_apiproxy.py @@ -8,7 +8,7 @@ import unittest from sdclientapi import * -from .utils import * +from utils import * import pyotp diff --git a/tests/utils.py b/tests/utils/__init__.py similarity index 100% rename from tests/utils.py rename to tests/utils/__init__.py From 147b3b6c7e0d5f049bd79480e39fac6e8491e31b Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 13:46:12 -0400 Subject: [PATCH 10/14] Saves the mocking information as sorted dict and into strings We need this to create the same key in different Python environments. --- sdclientapi/proxyapi.py | 2 +- tests/utils/__init__.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdclientapi/proxyapi.py b/sdclientapi/proxyapi.py index d4efa4b33..6c7eff003 100644 --- a/sdclientapi/proxyapi.py +++ b/sdclientapi/proxyapi.py @@ -80,7 +80,7 @@ def authenticate(self, totp="") -> bool: data = {"method": method, "path_query": path_query, "body": body} try: - result = json.loads(json_query(json.dumps(data))) + result = json.loads(json_query(json.dumps(data, sort_keys=True))) token_data = json.loads(result["body"]) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py index d30c47bd8..aa86a1b6c 100644 --- a/tests/utils/__init__.py +++ b/tests/utils/__init__.py @@ -37,8 +37,8 @@ def internal_sideeffect(*args, **kwargs): value_str = python_args["body"] value = json.loads(value_str) del value["one_time_code"] - python_args["body"] = json.dumps(value) - newargs = json.dumps(python_args) + python_args["body"] = json.dumps(value, sort_keys=True) + newargs = json.dumps(python_args, sort_keys=True) arguments = (newargs,) except: pass # Means no body in the call @@ -49,13 +49,13 @@ def internal_sideeffect(*args, **kwargs): try: value = python_args["headers"] del value["Authorization"] - python_args["headers"] = json.dumps(value) - newargs = json.dumps(python_args) + python_args["headers"] = json.dumps(value, sort_keys=True) + newargs = json.dumps(python_args, sort_keys=True) arguments = (newargs,) except Exception as err: pass # Means no Authorization token in the call - key = str((arguments, CALLNUMBER)) + key = arguments[0] + "+" + str(CALLNUMBER) answer = RES.get(key, None) if not answer: # Means it is not in cache. From d28a076e9b0ecfb5fa6b1cb66f708f3557831c72 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 11 Oct 2018 13:47:38 -0400 Subject: [PATCH 11/14] Updates test data JSON files for APIProxy --- data/setUp.json | 2 +- data/test_delete_reply.json | 2 +- data/test_delete_source.json | 2 +- data/test_delete_source_from_string.json | 2 +- data/test_delete_submission.json | 2 +- data/test_delete_submission_from_string.json | 2 +- data/test_download_reply.json | 2 +- data/test_download_submission.json | 2 +- data/test_error_unencrypted_reply.json | 2 +- data/test_failed_single_source.json | 2 +- data/test_flag_source.json | 2 +- data/test_get_all_replies.json | 2 +- data/test_get_all_submissions.json | 2 +- data/test_get_current_user.json | 2 +- data/test_get_replies_from_source.json | 2 +- data/test_get_reply_from_source.json | 2 +- data/test_get_single_source.json | 2 +- data/test_get_single_source_from_string.json | 2 +- data/test_get_sources.json | 2 +- data/test_get_submission.json | 2 +- data/test_get_submission_from_string.json | 2 +- data/test_get_submissions.json | 2 +- data/test_get_wrong_submissions.json | 2 +- data/test_reply_source.json | 2 +- data/test_star_add_remove.json | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/data/setUp.json b/data/setUp.json index fad9854c0..fd57f23da 100644 --- a/data/setUp.json +++ b/data/setUp.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}"} \ No newline at end of file diff --git a/data/test_delete_reply.json b/data/test_delete_reply.json index db1b2bc9a..385505e93 100644 --- a/data/test_delete_reply.json +++ b/data/test_delete_reply.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"headers\": {\"Content-Length\": \"1971\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1Njo0MSBHTVQifX0.DqCv2Q.Aa1MGzdgfUWB63aKSZfohanri1g; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:56:41 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/568e17fd-5492-4f99-af5d-9da8095892b0\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"568e17fd-5492-4f99-af5d-9da8095892b0\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"headers\": {\"Content-Length\": \"33\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:56:41 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1Njo0MSBHTVQifX0.DqCv2Q.Aa1MGzdgfUWB63aKSZfohanri1g; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Reply deleted\\\"\\n}\\n\", \"status\": 200}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:56:42 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1Njo0MiBHTVQifX0.DqCv2g.KNj2na3j6Y07VFG2W4oPyW3aCTw; HttpOnly; Path=/\", \"Content-Length\": \"1480\"}, \"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/568e17fd-5492-4f99-af5d-9da8095892b0\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"568e17fd-5492-4f99-af5d-9da8095892b0\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1NCBHTVQifX0.DqEaig.qonLMa3VAVf0Xe-GEOKl0E9urr8; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:31:54 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"1959\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-splay_epicure-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/c20e0f3d-2c7d-4d0f-af98-14424b9c312f\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe\\\", \\n \\\"uuid\\\": \\\"c20e0f3d-2c7d-4d0f-af98-14424b9c312f\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-splay_epicure-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/52561210-31a2-40db-bb8e-06d568fc618a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe\\\", \\n \\\"uuid\\\": \\\"52561210-31a2-40db-bb8e-06d568fc618a\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/c20e0f3d-2c7d-4d0f-af98-14424b9c312f\"}+2": "{\"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:31:55 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1NSBHTVQifX0.DqEaiw.AfjIgzuCP2yig3Cn9hD9pi8iWbQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"33\"}, \"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Reply deleted\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+3": "{\"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"4-splay_epicure-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/52561210-31a2-40db-bb8e-06d568fc618a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe\\\", \\n \\\"uuid\\\": \\\"52561210-31a2-40db-bb8e-06d568fc618a\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1NSBHTVQifX0.DqEaiw.AfjIgzuCP2yig3Cn9hD9pi8iWbQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:31:55 GMT\", \"Content-Length\": \"1477\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_delete_source.json b/data/test_delete_source.json index 00b1dac4e..954bdfbe2 100644 --- a/data/test_delete_source.json +++ b/data/test_delete_source.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMSBHTVQifX0.DqCspQ.77BI6fHXE1savwdYvI-jOFdq_6Q; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:43:01 GMT\", \"Content-Length\": \"5236\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msYfScR7Ev\\\\nnimAaXlbM/sWimFEHJWDS0r1Lmr7IvyobzbimMCbF35hy7hxphB2D30OnwARAQAB\\\\ntHxBdX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\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0l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hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+sV42niOI7009\\\\n5Dg1LwNrDloPp1So5gAskKshbOQ97rss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VSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Content-Length\": \"2630\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"headers\": {\"Content-Length\": \"73\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:08 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOCBHTVQifX0.DqEamA.Rz19VDYyhFF2_UvVptjQBdct478; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/user\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"151\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T17:32:07.242517Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"5233\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"wingless howler\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZMBEACUDbVOFlpWWeOugPWX5dX1sBGaduX1P01XO27dgFUedd7Rqe51\\\\nNLelyIWFocRg+Ee+c0sskEr+zih3s4n+A4Vjyn2fZjapaoHYCbosv8A1C9AXt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Yx7aaxED8gLk47fxCAcjq+t9eo3jq5x85\\\\n+N96ZMpPO1Dhz4lVOMEr8QEYobSZZZ1W9Uq6xr7LycNuwBE33zpKw7gzWBA3TUiH\\\\nsX8cSjaf6gVnbqQD682ayPo2x7ZljZghjGCv87ZT0yJ1fzx5U5gaYugUWxVvu1PK\\\\nHKmqjC+gl/4i5EgfWVerNSGBH+MwoNrQp10lmNhIFBKts3iVBkVerXeyHnvJcYpZ\\\\nclZagGth7pfw3RS1QFNZbTcNYnwAp0UBczKvkhwniB/BjIkaHQ3Gu8HYd3jqKEI5\\\\nV2BSPNe4mV5hKIGdelp6BA/yh1LRl6KUzHsDs5qDmgHSRychkBAEbgPsHkRqJjW5\\\\nNm0/CPUMmcX6dEMMY9OwEYVX5ZllfbzOUQlwxx2h6tG6snmewbl3USbGy/QR2Abv\\\\n3N4xRwhgFEhZChmje4KAmV7LQiZTjZg6QXO9LV4YXMr9gerAm/q4TuFk7Z5p5phH\\\\n4egWb6umT6Tj/Mud2vrYSIPu0byroQxSZbU0hYeRGAg=\\\\n=lewJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:12.587473Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZYBEACmzFDMSMUCEy7+LjnrVdXxCVRjtayb+ok/cCUD1zzAEOvatWaO\\\\nG9lBOFWBsQD5Brj893ONOWjxeckhZ33TUa5WA2jC4FC2Hmx4q1lApxYqkDS0mEy4\\\\nyclZDHpWADCFsF2z8oIOTB/v/v1OqyFHmshoJvXN0jpXehBiRIWL7SzB2Hnj/rMD\\\\n+ax4+WZ27TxgBJ5SJrbgoMGHMayOMEcsdwmIXeDnjB1VK399BetiDPYr6/1AaYgM\\\\nT8TerY0oDRMUtpCOI8L0FyV1/qyeSrupki36GDaElyKCHkxf+ypes2b49tqo7m9q\\\\nFkqU/hWQHik8s77/UxTYeG/A2wTQs6D5dqyd95x9qMwfLk3k4dVDh+3bhBnAqnPP\\\\nYHEGngl2u4XQIs8+Q9GJoRoa9xLdCxscg88YZoe4kU+Bu/X3tXEVc9Rl2KfcAt2o\\\\nnsS89Kj7cEF3jx6nNXDYnNDXt2uSXPfv1RtvAk0bs8m0rS9BoVmKnaaQUEY/ZnR2\\\\nYLb0+VUPofJ11oPtJwpKdrJCivNi6kvDrMj2huyr603DxoG5OWjyYZ38vUuBFWIC\\\\nxRfDzLkHqyk/oJgEDRiPZRYf1LE2mz5xVesq2PTjR6Oe2X3qyPhY2msaUS48Xwvs\\\\nLyCXM71BikBdiwnq8GlgYw2RgKha1OwLH1uehEs8fBSSp8VkGtYxVX/8jQARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8VzdNRzZHTlpIWEpWV1REM1IyS1dPU0VDRUpG\\\\nUDJIQzJRUkVCNkxNQkhNTVpVSFVDV0xZUTRIM09DUENZNkFKVFFaRFlXVUtNVVVL\\\\nSkNLSEFLN0E1VzdTWFVQREVZM0lDTUxESkJDQT0+iQI/BBMBCgApBQJbv4mWAhsv\\\\nBQkB4OUqBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ+vfhGYqraDLAIA/+\\\\nMfaRmAcy8SGkFkcNF3RWhrSCdx3q/QCky/UmRNacDDVvW5qEP/hIQdvmPZJuPgCV\\\\n+z4D+zsDWCT5h4lXeFiS9pUIzIylqafsuG4QjXQCYEsI5C+lu6Tg1eiGCr/G7KMD\\\\nr5909C+O3NYDErFw/PRrcVeaHQmDzaV9iexNNRdPhdtnnSs9QmwumGXvF4ey5wx5\\\\nIxCtyqm/+Ymd/VK6BKSOgzeJG8/EnUOxii/RiTrQgZAAo6DSHAgra6sH+ve+VM1g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\"}, \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+3": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\":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EGFQgCCQoLBBYCAwECHgECF4AACgkQ+vfhGYqraDLAIA/+\\\\nMfaRmAcy8SGkFkcNF3RWhrSCdx3q/QCky/UmRNacDDVvW5qEP/hIQdvmPZJuPgCV\\\\n+z4D+zsDWCT5h4lXeFiS9pUIzIylqafsuG4QjXQCYEsI5C+lu6Tg1eiGCr/G7KMD\\\\nr5909C+O3NYDErFw/PRrcVeaHQmDzaV9iexNNRdPhdtnnSs9QmwumGXvF4ey5wx5\\\\nIxCtyqm/+Ymd/VK6BKSOgzeJG8/EnUOxii/RiTrQgZAAo6DSHAgra6sH+ve+VM1g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:49 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OSBHTVQifX0.DqEcKQ.nIi7q2oAq4z9LwOpa3Q4Z7UT8C8; HttpOnly; Path=/\", \"Content-Length\": \"2627\"}}"} \ No newline at end of file diff --git a/data/test_delete_source_from_string.json b/data/test_delete_source_from_string.json index 00b1dac4e..954bdfbe2 100644 --- a/data/test_delete_source_from_string.json +++ b/data/test_delete_source_from_string.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMSBHTVQifX0.DqCspQ.77BI6fHXE1savwdYvI-jOFdq_6Q; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:43:01 GMT\", \"Content-Length\": \"5236\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9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JwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\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F4AACgkQgimLLlolhdx9/hAA\\\\nim7dinkVkDETUgjAi21b/s4bzR4plSxYEG49Jopruv4kEQf133l8OHmHIUcMSU3T\\\\n3nwWTACAMqw9IhV1vJLslivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJ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dEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MzowMiBHTVQifX0.DqCspg.y3Imz7tLZmJ_BfrXiNZEi6P-PpE; HttpOnly; Path=/\", \"Content-Length\": \"2630\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:43:02 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"headers\": {\"Content-Length\": \"73\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:08 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOCBHTVQifX0.DqEamA.Rz19VDYyhFF2_UvVptjQBdct478; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/user\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"151\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T17:32:07.242517Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"5233\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"wingless howler\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZMBEACUDbVOFlpWWeOugPWX5dX1sBGaduX1P01XO27dgFUedd7Rqe51\\\\nNLelyIWFocRg+Ee+c0sskEr+zih3s4n+A4Vjyn2fZjapaoHYCbosv8A1C9AXtQip\\\\n6F5k099stXUsl2iP3q5Bq1r4osWXH6z6/5pWYpl8JdLEpbx2K1OmVr44PaCO3wTA\\\\nlzHTYJYtDV9ZvQzJbD76nxD+rsueUKTjTQ32ot51QG0mQmcX3d+PTOlbOodMsu9d\\\\nnOfTf7JeYg/7eLlP3ACVUHgEwNvNvcAVXMpIvHbcAYWM1iHsDolzzqe/phs6omT3\\\\n4hBzySrxj+6eJ3TOss/uby7dPMwdrWvbRlpJv0uiuw6SaGGu0ZisnHp9j+u4fF7m\\\\nGYLf7l2GiTjwazlVfG93XfFimmr+MhRnVczY2abjezYJCUF0oNSsYyRStVnxNeNh\\\\nDvddgs4H74lZIZZBFlusTdmAyDXAILcynz2W03s6vaGmys02jnlXYBURM90OEgLI\\\\nWl7PNzzJ2AkmkO74jfdq1I5bHnIlydaDu0f4sE1BxmWOGseok6/j0LHQ/bvxCf3W\\\\n7S3rpNUPtBGbXRNPNHJyBwZTY68SJ/QmVR1qA8bO/g9eAv1fp/qZ9wGnYFoTIk2i\\\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xSZbU0hYeRGAg=\\\\n=lewJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:12.587473Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZYBEACmzFDMSMUCEy7+LjnrVdXxCVRjtayb+ok/cCUD1zzAEOvatWaO\\\\nG9lBOFWBsQD5Brj893ONOWjxeckhZ33TUa5WA2jC4FC2Hmx4q1lApxYqkDS0mEy4\\\\nyclZDHpWADCFsF2z8oIOTB/v/v1OqyFHmshoJvXN0jpXehBiRIWL7SzB2Hnj/rMD\\\\n+ax4+WZ27TxgBJ5SJrbgoMGHMayOMEcsdwmIXeDnjB1VK399BetiDPYr6/1AaYgM\\\\nT8TerY0oDRMUtpCOI8L0FyV1/qyeSrupki36GDaElyKCHkxf+ypes2b49tqo7m9q\\\\nFkqU/hWQH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HabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\"}, \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+3": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZYBEACmzFDMSMUCEy7+LjnrVdXxCVRjtayb+ok/cCUD1zzAEOvatWaO\\\\nG9lBOFWBsQD5Brj893ONOWjxeckhZ33TUa5WA2jC4FC2Hmx4q1lApxYqkDS0mEy4\\\\nyclZDHpWADCFsF2z8oIOTB/v/v1OqyFHmshoJvXN0jpXehBiRIWL7SzB2Hnj/rMD\\\\n+ax4+WZ27TxgBJ5SJrbgoMGHMayOMEcsdwmIXeDnjB1VK399BetiDPYr6/1AaYgM\\\\nT8TerY0oDRMUtpCOI8L0FyV1/qyeSrupki36GDaElyKCHkxf+ypes2b49tqo7m9q\\\\nFkqU/hWQHik8s77/UxTYeG/A2wTQs6D5dqyd95x9qMwfLk3k4dVDh+3bhBnAqnPP\\\\nYHEGngl2u4XQIs8+Q9GJoRoa9xLdCxscg88YZoe4kU+Bu/X3tXEVc9Rl2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EIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:49 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OSBHTVQifX0.DqEcKQ.nIi7q2oAq4z9LwOpa3Q4Z7UT8C8; HttpOnly; Path=/\", \"Content-Length\": \"2627\"}}"} \ No newline at end of file diff --git a/data/test_delete_submission.json b/data/test_delete_submission.json index 94a5c80c7..b5badc77a 100644 --- a/data/test_delete_submission.json +++ b/data/test_delete_submission.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0NToyOCBHTVQifX0.DqCtOA.jU6MzsluD8-xcnKAUdaA6ru4cj0; HttpOnly; Path=/\", \"Content-Length\": \"2049\", \"Date\": \"Thu, 11 Oct 2018 09:45:28 GMT\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/1706cab3-32ee-4242-ae83-7ece90405581/download\\\", \\n \\\"filename\\\": \\\"1-palatial_stranger-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/1706cab3-32ee-4242-ae83-7ece90405581\\\", \\n \\\"uuid\\\": \\\"1706cab3-32ee-4242-ae83-7ece90405581\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc/download\\\", \\n \\\"filename\\\": \\\"2-palatial_stranger-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc\\\", \\n \\\"uuid\\\": \\\"e1d4d0b2-55cf-471c-9917-a41b164947bc\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d/download\\\", \\n \\\"filename\\\": \\\"1-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d\\\", \\n \\\"uuid\\\": \\\"356ae820-9776-44f7-9521-ea53b0a6772d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9/download\\\", \\n \\\"filename\\\": \\\"2-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\", \\n \\\"uuid\\\": \\\"1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/1706cab3-32ee-4242-ae83-7ece90405581\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:45:29 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"38\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0NToyOCBHTVQifX0.DqCtOQ.wx3hv-MocAmCs3Ihf3UQ1oCuwZc; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0NToyOSBHTVQifX0.DqCtOQ.kxllaJiRAVSG3Vxjkpqn8aJopWA; HttpOnly; Path=/\", \"Content-Length\": \"1543\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:45:29 GMT\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc/download\\\", \\n \\\"filename\\\": \\\"2-palatial_stranger-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/6c2bb559-b817-4d1a-99a7-e2f030cec6f7/submissions/e1d4d0b2-55cf-471c-9917-a41b164947bc\\\", \\n \\\"uuid\\\": \\\"e1d4d0b2-55cf-471c-9917-a41b164947bc\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d/download\\\", \\n \\\"filename\\\": \\\"1-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/356ae820-9776-44f7-9521-ea53b0a6772d\\\", \\n \\\"uuid\\\": \\\"356ae820-9776-44f7-9521-ea53b0a6772d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9/download\\\", \\n \\\"filename\\\": \\\"2-municipal_seventh-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/649b8d96-ad61-414e-8f49-3c693f6738fc/submissions/1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\", \\n \\\"uuid\\\": \\\"1b0831cc-e17f-4218-98a9-b5e8bc5081d9\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:40:47 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2039\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MDo0NyBHTVQifX0.DqEcnw.XVsouWt65Dt6-pT1geMJPVO8ut0; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/3f215dce-2e8d-4d15-b2a3-149c293171ae/download\\\", \\n \\\"filename\\\": \\\"1-beery_bribe-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/3f215dce-2e8d-4d15-b2a3-149c293171ae\\\", \\n \\\"uuid\\\": \\\"3f215dce-2e8d-4d15-b2a3-149c293171ae\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9/download\\\", \\n \\\"filename\\\": \\\"2-beery_bribe-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\", \\n \\\"uuid\\\": \\\"c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765/download\\\", \\n \\\"filename\\\": \\\"1-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765\\\", \\n \\\"uuid\\\": \\\"d5565739-7755-4abe-a968-571cc877e765\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de/download\\\", \\n \\\"filename\\\": \\\"2-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de\\\", \\n \\\"uuid\\\": \\\"65da24da-44f1-481c-bf34-b9e5be64b5de\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/3f215dce-2e8d-4d15-b2a3-149c293171ae\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:40:48 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"38\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MDo0OCBHTVQifX0.DqEcoA.GtKM2649QA5lynN5TR6pQ2IVFlY; HttpOnly; Path=/\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+3": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9/download\\\", \\n \\\"filename\\\": \\\"2-beery_bribe-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\", \\n \\\"uuid\\\": \\\"c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765/download\\\", \\n \\\"filename\\\": \\\"1-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765\\\", \\n \\\"uuid\\\": \\\"d5565739-7755-4abe-a968-571cc877e765\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de/download\\\", \\n \\\"filename\\\": \\\"2-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de\\\", \\n \\\"uuid\\\": \\\"65da24da-44f1-481c-bf34-b9e5be64b5de\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MDo0OSBHTVQifX0.DqEcoQ.fzIdZn2XEYYizcc70xZa1WDZTfo; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:40:49 GMT\", \"Content-Length\": \"1539\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_delete_submission_from_string.json b/data/test_delete_submission_from_string.json index de1930ffc..9577ea164 100644 --- a/data/test_delete_submission_from_string.json +++ b/data/test_delete_submission_from_string.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Content-Type\": \"application/json\", \"Content-Length\": \"5242\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0NiBHTVQifX0.DqCthg.wiR7MaGytFIPGy3HKCIiPrIrTfk; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:46:46 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"contented grouping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/G9UBEACtS3ofKMNSL+HYmcbAcy8pwg8Ka2nLhBYcUO0K17OmFYb9IKCf\\\\nGrXOyz5NX/qCtKh7dekIdichdoLIDa9SC1Lu04mCo2ZPE6Up9WwQDgdyWdWtPgF6\\\\n3A+4I90U1NJnMiasskm9gu8XqVeMaeo92W61x8i1d5J+VlxP3d3sdhUw3uLGaKC4\\\\naLrGTXUZRyWnrvX0pL7s8R2ejeYDyAPJp0DFhrqTWsn0jRvj42ifPvCzrL+yfy7e\\\\n6z1HoHV3VXr/rJ+RDCDVwVJAMuXAnWfu4srje6tIJUttwSgm84ddwN6GZO1RXn9H\\\\nNKZM7yCgX9Y5nHbNNLmKSOZKfHSHnb7q/Etg0+WD1MzGlwcYDkZfi5jqNUMxfmFt\\\\nkEuduqKXNomTci2MLVrbWlLLlryqUj8zoTKORWW18hvLaySdON5Xf0dCOvrejIIK\\\\nJ6Cav6qauXSubWiZhASUq2bUJdSLMXwa+X9vkPVvnhKwdpZYk43DAtRTmVIUaRed\\\\nNsWy2FVZAsF0lUrJ0EqNL3DS4Ox7f/17syNdJ1Y83sYIuyFbPijzxO2VAISKOmyx\\\\nnNxgEOgwZSzkZTw8nwcNzKseGdRoR5GS+nhn4PZSHj9MgZkCfyLu1thxEoukOvqJ\\\\nVf8npx5rpuBaLOY8lIVwFxZjOr/OxqISUFIJGJnl/TaER9c9RTrpr8FbgwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8RkdGSU5RSVM1VUhP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\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"uuid\\\": \\\"19878649-3bab-48a5-bbd1-ab0056b30a5f\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"gynecological barring\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/G9gBEADiHoYNc7lFejOarQgSdXlwuxazH4Msj1dlIDdYh9okm6fok1o2\\\\n12mCVgckXChus5qRZv5gX57clyJBOTNsYWGds+/wvIKJpRuf0bKwf38/faKvqlON\\\\nU5W/J1KizoyDHUY3PkSCrFpSFawwBsSbeUQ298BabWdUDT91lAAVF3SD3BXsEp7P\\\\n0ayI6yLd//d+Q8YAPaskwzqMUZZ1yk+PtYYs502gjE4FFizLKF7mofqAwwTYCI8N\\\\n2cU80hepO7pgGxdyQ4yLMr6pmqSu3+dOyEVx+6RhPEky5vSgJNXrcJzw89W0UrrD\\\\ntW4ODCLG/X/QZgj4T2EbFxOxM9BCEQyIPzZBeXbIYszNSQgtBqhQbNuo8MAsCsEG\\\\nMIFGs2DXwikccACYyiNF7zTxfEgeajwRvHTuTB1RtAH4uKeOg0zE6a35r4zLbXUG\\\\n63VhCcrG7JDGgNybe6QYb/ZH4t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KI398JeP0qgzk\\\\nY0s6Hsnx6MI6YTsasgV1uAFGewTr550XGvtI+O8M92XBpXSIVUtDsOH23lpMGGjU\\\\nvUwkJOk6ctxmKuSYZUNkRP5LAozj6OCxZ3El3QkMQVRU343zirgv14YOc0wId90t\\\\nQ3x/1/ylG/r21alL8v1vMuLBFxYzLuqLQEDLjvIlJ1c=\\\\n=I6Uj\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:46:03.178691Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479\\\", \\n \\\"uuid\\\": \\\"efad4260-cad7-4588-9972-693f684f6479\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:46:46 GMT\", \"Content-Length\": \"1039\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0NiBHTVQifX0.DqCthg.wiR7MaGytFIPGy3HKCIiPrIrTfk; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/2f71409f-80c9-408e-ad7b-ff1bd652f24e/download\\\", \\n \\\"filename\\\": \\\"1-contented_grouping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/2f71409f-80c9-408e-ad7b-ff1bd652f24e\\\", \\n \\\"uuid\\\": \\\"2f71409f-80c9-408e-ad7b-ff1bd652f24e\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687/download\\\", \\n \\\"filename\\\": \\\"2-contented_grouping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687\\\", \\n \\\"uuid\\\": \\\"fd34fab8-aece-4e7b-af32-360a4dde3687\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"DELETE\", \"path_query\": \"api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/2f71409f-80c9-408e-ad7b-ff1bd652f24e\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:46:47 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0NyBHTVQifX0.DqCthw.iVUctwvUnnE8eh5Sh_Adt4YObIM; HttpOnly; Path=/\", \"Content-Length\": \"38\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 4)": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687/download\\\", \\n \\\"filename\\\": \\\"2-contented_grouping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/19878649-3bab-48a5-bbd1-ab0056b30a5f/submissions/fd34fab8-aece-4e7b-af32-360a4dde3687\\\", \\n \\\"uuid\\\": \\\"fd34fab8-aece-4e7b-af32-360a4dde3687\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f710db08-2c6c-4b64-a59d-5a32b176e4e4/download\\\", \\n \\\"filename\\\": \\\"1-gynecological_barring-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f710db08-2c6c-4b64-a59d-5a32b176e4e4\\\", \\n \\\"uuid\\\": \\\"f710db08-2c6c-4b64-a59d-5a32b176e4e4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f0e0c25d-4860-4496-b786-c9968ae0da5f/download\\\", \\n \\\"filename\\\": \\\"2-gynecological_barring-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/efad4260-cad7-4588-9972-693f684f6479/submissions/f0e0c25d-4860-4496-b786-c9968ae0da5f\\\", \\n \\\"uuid\\\": \\\"f0e0c25d-4860-4496-b786-c9968ae0da5f\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0Njo0OCBHTVQifX0.DqCtiA.cN22aEq6BsU9fc2HU-9bRjHJfsU; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:46:48 GMT\", \"Content-Length\": \"1552\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"standard torus\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"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Kqlzd5BjCXdekiVw1hun3PWs6G1+jkriFzOb/6DUxeWRpvfB/yHTT4DN7XlN/iou\\\\nUX5qpIZnBsUDyfJxkUvlCX6HxcvJ+K4KhNej5wiFr3POnji1bc97EUBzokxI4NLX\\\\nzoTWr3lDf8U2V++Xwcw4QP2bHCQwu+bRoLoPBsjPpYb6rSoJfljNCVF/O2dEldky\\\\nMTeyH+/NJStuOc1jaYjeeoktNSkpwTBtI9kiJgMhskoqMcBcq6llp/e6MuaSS+5I\\\\n9VOZT/fuZ4FBP7WdAoaOPRdpA1L1iBPQ5GL4Cm+rQNEIoSKB9sEw0G9uEh5wLBby\\\\n19450UQlsUASU48jF/kBw+IU6KLs5QuR3UF+ktUphPJi3NHdKHuwBxW2Rjbb/HR8\\\\nxaF6UuZJRUveRcYgt5dVjpTAc5RzmHcOJiB91oX2G6cqwFNM3QG8eDQwyHPKRD2/\\\\nV3/Yne2XL/ix3h7Fifz+3Wc95ewE3zjrMucsjP2uvgX9I7Rac5xwqCQ0QY64/5F4\\\\nqd/RliZXhcM0UvuzYHtPyZPIDmlSAJZT0W+S/W1bLbvoo1u0vhhiyJoRrD31bGkM\\\\nOb2+CHyDSdg5apQ5Tg0BwGy5nZKl0PdGD5a/qXuw/01kIJujSvDAz0z9+ezQWDKI\\\\nNVIBlA0XKCJ99veAN2GCecQkkhQkTkJwEb2qpmn4Tlc=\\\\n=F/qV\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:41:06.862851Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"uuid\\\": \\\"41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"offshore wiper\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/izQBEACmldggKSyKyGmX2IbpcKcHquHrkYygrf4C3sqX6+BOn8nbXduy\\\\nY2ppIW1fmd6UoDla3Io8x5WWAagvlFf8FYTG0iPiai1E6Hn8Lzo0ff2c+fOfsOYd\\\\nctlgqTlCEmn9HqYp/W1NGvCTzFainlk6XRKq45yA87wde86Qhb1kto4QBBKerfNE\\\\nxlZVmSP/XZf7FhEvQaXNFLJtWLyMhvZpyKuf9Eygy04QgqKIJaL9MLM8bhXPl294\\\\nThUJLobry4chJnzBasyOxKOdPYsIyeAq7y6wHFt6v+1+EZUUS7xhrJ79G8GO10n/\\\\n+CZrpCwcllvE6Hr0qbRahLGIh3XC90dmXMjsEislDSLzYCzTTZlKVn4mBC066IvQ\\\\nL+abURfTU8th5W/KgvN0DWn1tojn7BYqMpAy+PQ5Hjedxu+fn9xhNXKxNSlcxtaG\\\\nF4QcH8bTFekJWJE2Io5AEGd4wpeEx47nZpeqcCSd8Rf0UQQ3dbQOskzqA+ctwAfR\\\\nLOTxRPnb/tr0knJm88kzO/NmnXyiysqjTjyE9zr68cpPwxCW+gyErvLo8II9rAo6\\\\nanZHVbPz7NLEUUijaiNYMfTOYusUnzl57QRuCPj2irGr0WL/mWaQoNATTqUKTdL4\\\\nQy4Tp7x+2LAYAGpphH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=d7YK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:41:11.808980Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561\\\", \\n \\\"uuid\\\": \\\"a5b94646-bcf6-43a4-ade2-01f528d5f561\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Length\": \"5231\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1NyBHTVQifX0.DqEc5Q.HZD3owqQXAt6Y0XxVPwNtvTJcJ4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:41:57 GMT\"}, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions\"}+2": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:41:58 GMT\", \"Content-Length\": \"1031\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1OCBHTVQifX0.DqEc5g.LBMc4wzzJUT19RBUvVwFRgj9JDw; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7/download\\\", \\n \\\"filename\\\": \\\"1-standard_torus-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7\\\", \\n \\\"uuid\\\": \\\"e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78/download\\\", \\n \\\"filename\\\": \\\"2-standard_torus-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78\\\", \\n \\\"uuid\\\": \\\"dafc9e75-be08-4436-8aae-0f96c09c3f78\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7\"}+3": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:41:59 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1OSBHTVQifX0.DqEc5w.7_llCSkVAICUbGN75aMdldsxfBs; HttpOnly; Path=/\", \"Content-Length\": \"38\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+4": "{\"version\": \"0.1.1\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1OSBHTVQifX0.DqEc5w.7_llCSkVAICUbGN75aMdldsxfBs; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"1534\", \"Date\": \"Thu, 11 Oct 2018 17:41:59 GMT\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78/download\\\", \\n \\\"filename\\\": \\\"2-standard_torus-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78\\\", \\n \\\"uuid\\\": \\\"dafc9e75-be08-4436-8aae-0f96c09c3f78\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/730cd7c6-a7ea-40ae-bf2d-7345ba3ed24f/download\\\", \\n \\\"filename\\\": \\\"1-offshore_wiper-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/730cd7c6-a7ea-40ae-bf2d-7345ba3ed24f\\\", \\n \\\"uuid\\\": \\\"730cd7c6-a7ea-40ae-bf2d-7345ba3ed24f\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/ae93844d-397d-4140-ba80-f76489db71b5/download\\\", \\n \\\"filename\\\": \\\"2-offshore_wiper-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/ae93844d-397d-4140-ba80-f76489db71b5\\\", \\n \\\"uuid\\\": \\\"ae93844d-397d-4140-ba80-f76489db71b5\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_download_reply.json b/data/test_download_reply.json index 55f6fc408..f62ec89c3 100644 --- a/data/test_download_reply.json +++ b/data/test_download_reply.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-longitudinal_cellist-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0/replies/f315e4b8-e2d3-4b58-a8d1-131ff5da6f42\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0\\\", \\n \\\"uuid\\\": \\\"f315e4b8-e2d3-4b58-a8d1-131ff5da6f42\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-longitudinal_cellist-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0/replies/ab5a6a0f-669b-4fb9-acbb-d0d9aec3feda\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0\\\", \\n \\\"uuid\\\": \\\"ab5a6a0f-669b-4fb9-acbb-d0d9aec3feda\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-indie_second-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483/replies/f42ec66c-492f-4170-910b-4b1963256e14\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483\\\", \\n \\\"uuid\\\": \\\"f42ec66c-492f-4170-910b-4b1963256e14\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-indie_second-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"5a61d11a-fdac-423b-9c78-3a7d44957b45\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483/replies/0a142d8f-55f3-4476-a2f0-eb7bade55e8a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/200d180a-34db-4c08-9f26-f75aa784b483\\\", \\n \\\"uuid\\\": \\\"0a142d8f-55f3-4476-a2f0-eb7bade55e8a\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNjo0OToxNiBHTVQifX0.DqD0bA.0DwUB-J-sRcCsidgVSwRODc-m2E; HttpOnly; Path=/\", \"Content-Length\": \"1961\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 14:49:16 GMT\"}}", "(('{\"method\": \"GET\", \"path_query\": \"/api/v1/sources/173e7587-5cc1-412a-98dd-4f82d69a37b0/replies/f315e4b8-e2d3-4b58-a8d1-131ff5da6f42/download\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"body\": \"{\\\"filename\\\": \\\"67a6ada8-9522-4ec3-9c6f-75e61a3ceef7\\\"}\", \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Content-Disposition\": \"attachment; filename=3-longitudinal_cellist-reply.gpg\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNjo0OToxNiBHTVQifX0.DqD0bA.0DwUB-J-sRcCsidgVSwRODc-m2E; HttpOnly; Path=/\", \"Etag\": \"\\\"sha256:a69b2f47c0ec8e8b84b4ee0d35cad39747e0008ba2c0081a5993602d56a80b07\\\"\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 14:49:16 GMT\", \"Vary\": \"Cookie\", \"Expires\": \"Fri, 12 Oct 2018 02:49:16 GMT\", \"X-Origin-Content-Type\": \"application/json\", \"Cache-Control\": \"public, max-age=43200\", \"Content-Length\": \"1116\", \"Last-Modified\": \"Thu, 11 Oct 2018 09:57:21 GMT\"}}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:31:58 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"995\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1OCBHTVQifX0.DqEajg.ARAONfzm1qwFhUGJhgbj3oqFkYY; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc/download\"}+2": "{\"headers\": {\"Expires\": \"Fri, 12 Oct 2018 05:31:59 GMT\", \"Content-Type\": \"application/json\", \"Last-Modified\": \"Thu, 11 Oct 2018 17:31:36 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1OSBHTVQifX0.DqEajw.xkXUHch05cVqTcobnWNmVaRTaS4; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Etag\": \"\\\"sha256:a53a1e10fcaca9ec40889647f72133b011fba2eee6c6ce251870dabdf253a653\\\"\", \"Content-Disposition\": \"attachment; filename=3-rose-colored_rifle-reply.gpg\", \"Content-Length\": \"1116\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Cache-Control\": \"public, max-age=43200\", \"Date\": \"Thu, 11 Oct 2018 17:31:59 GMT\", \"X-Origin-Content-Type\": \"application/json\"}, \"body\": \"{\\\"filename\\\": \\\"01599391-8094-447e-9a98-86290f2aff6f\\\"}\", \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_download_submission.json b/data/test_download_submission.json index a62c31e49..bbc373c74 100644 --- a/data/test_download_submission.json +++ b/data/test_download_submission.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNzowMToxMiBHTVQifX0.DqD3OA.EW-4IatzGImxMbvR8lrYi4eeHjY; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 15:01:12 GMT\", \"Content-Length\": \"2059\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6/download\\\", \\n \\\"filename\\\": \\\"1-electric_cashbox-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\", \\n \\\"uuid\\\": \\\"cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/00fb8e3b-90e5-485a-b8cf-a40fce155292/download\\\", \\n \\\"filename\\\": \\\"2-electric_cashbox-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/00fb8e3b-90e5-485a-b8cf-a40fce155292\\\", \\n \\\"uuid\\\": \\\"00fb8e3b-90e5-485a-b8cf-a40fce155292\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/1f8db8de-6ed9-46ed-9671-8d1ab911d39e/download\\\", \\n \\\"filename\\\": \\\"1-paramilitary_submariner-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/1f8db8de-6ed9-46ed-9671-8d1ab911d39e\\\", \\n \\\"uuid\\\": \\\"1f8db8de-6ed9-46ed-9671-8d1ab911d39e\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/956e6c07-8934-4c47-9f2f-1e3d65c5e375/download\\\", \\n \\\"filename\\\": \\\"2-paramilitary_submariner-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3fad2ad5-72a4-414e-922d-627ae93c9e1f/submissions/956e6c07-8934-4c47-9f2f-1e3d65c5e375\\\", \\n \\\"uuid\\\": \\\"956e6c07-8934-4c47-9f2f-1e3d65c5e375\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6/download\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"headers\": {\"Cache-Control\": \"public, max-age=43200\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNzowMToxMiBHTVQifX0.DqD3OA.EW-4IatzGImxMbvR8lrYi4eeHjY; HttpOnly; Path=/\", \"Content-Length\": \"604\", \"Date\": \"Thu, 11 Oct 2018 15:01:12 GMT\", \"Last-Modified\": \"Thu, 11 Oct 2018 14:59:38 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Etag\": \"\\\"sha256:965d1cc795e682dda26e08c3ffceb05d90fcad5867008ea9041c2f6b51f40bcf\\\"\", \"Vary\": \"Cookie\", \"Expires\": \"Fri, 12 Oct 2018 03:01:12 GMT\", \"X-Origin-Content-Type\": \"application/json\", \"Content-Disposition\": \"attachment; filename=1-electric_cashbox-msg.gpg\"}, \"body\": \"{\\\"filename\\\": \\\"cae6efb7-3927-4274-98cf-a8c4f56b08be\\\"}\", \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6/download\\\", \\n \\\"filename\\\": \\\"1-electric_cashbox-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/d5cb8194-2484-4fb9-813f-69a6bef3057a/submissions/cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\", \\n \\\"uuid\\\": \\\"cb2acb12-02fe-4aaf-8a68-72f9aac54ed6\\\"\\n}\\n\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 15:01:13 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"466\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxNzowMToxMyBHTVQifX0.DqD3OQ.kR00EWVU_q29n_E1yF5M3uhu5-4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"1039\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMCBHTVQifX0.DqEakA.9oQ4CoOdcJ45LFsTvG5UilBrEs4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:32:00 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\"}+2": "{\"body\": \"{\\\"filename\\\": \\\"72c1544c-2ed0-4930-b273-e1364a4ef008\\\"}\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Last-Modified\": \"Thu, 11 Oct 2018 17:31:36 GMT\", \"Content-Length\": \"604\", \"Vary\": \"Cookie\", \"Expires\": \"Fri, 12 Oct 2018 05:32:00 GMT\", \"X-Origin-Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMCBHTVQifX0.DqEakA.9oQ4CoOdcJ45LFsTvG5UilBrEs4; HttpOnly; Path=/\", \"Etag\": \"\\\"sha256:ffccee92463b6d07d0c24a4834988396197d4b4d6f1b962dccab08d2503de08f\\\"\", \"Date\": \"Thu, 11 Oct 2018 17:32:00 GMT\", \"Cache-Control\": \"public, max-age=43200\", \"Content-Type\": \"application/json\", \"Content-Disposition\": \"attachment; filename=1-rose-colored_rifle-msg.gpg\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\"}+3": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n}\\n\", \"headers\": {\"Content-Length\": \"468\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMSBHTVQifX0.DqEakQ.7QOj9jp6BKASlpyampy-sFJZrZs; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:32:01 GMT\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_error_unencrypted_reply.json b/data/test_error_unencrypted_reply.json index 87cf7c34d..2fdd5ad44 100644 --- a/data/test_error_unencrypted_reply.json +++ b/data/test_error_unencrypted_reply.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"pyrrhic bullfinch\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HCUBEAC91OgTBsFOm+JJGl7i+jS/oR6ARJM88227D0YjqHJgoCTriTbt\\\\nrVcqgYK1w0zS2p60UIAiuPBKHkRS1Qs362AYvi8XJQwt6bmaz7Rg09j5ctugmN+L\\\\n/4lDHtVgs08Nw0BkOvj/ZGAaSHS72DI8XoPNoZ8GNSRYO/JWZD1lz3QxT5vstNbU\\\\nj6514BWs/tfW9jItGBbycUSTaPeAuez20ipqn9VoaTMWDcl1rwHiKGbI4QDU3rqu\\\\n4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5VEGHPwxLLJX3lnooxjuxg52oI9V\\\\nn2rEzf3GNXA7+xGqvMCeetHUFONUWE56OCgySULi3ptmQlraQI66DWMn/QBMYrFF\\\\nGE7CA3Vki4JnvX5GwbbKhpOqef/xJsInHWdfZZFT21P45vF2s4fvAkAwjVekur14\\\\nKIbe7kbWYuQBG2hhC6TWd9M6Gwta0uQWTz6UBB+gz7RoRqsDKNU1dlHmbQLjClr6\\\\niTC+NNPrKqzsE62+LUv5srmTuMCRTSPwWhqCKH7Av9FjqUPiWo9Yu8e/oJZcRl72\\\\nG863e0wI2vaPUjxbd2jCGs+WxHACWu/2/CcF+4ZqUVrzdxockIRJQEz4a0L8EGuc\\\\nLqzFDGlTiJCPb6umd5aoRyU3eSKAb1fhhZyUt/DRTS0=\\\\n=l0jn\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:47:19.113278Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\", \\n \\\"uuid\\\": \\\"7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"holier-than-thou naturalness\\\", \\n \\\"key\\\": {\\n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UJPiBAA\\\\ngDzkml+OCgaWfbIJGCCkhqMMqq30FlfBx0lU93/G5GBQQicmV5WBS9wfAU+TuKVY\\\\n79y1jB067nfwaN7ya60UrjU+zHSVVWvpLvMNKMBV/ZdGgpJ3VNwW5S78yKyPSMhR\\\\nN9gnPOFjpv+FxZg8yHRDH/C4xk4QkwF24yKGZMlhJ5ejXIrfhEnktxW6RbXLy+qR\\\\nYalZnDIC4NWKwzqUj+oafZibdaYhDgXg2l22E7Q+oKYa6JhadIrgcSKya+2diI+S\\\\nojK6P+bYzZ2S9YpuKiLwr8e2Zd4+QJPlcMlAHtv74OXrSBYd3YxfR22g386udvB5\\\\nfhOJZ2KMvM4eY62aVZP10r8qq3+TcNMhbvds3+onP9m3AZjpHu3qfjIxsU5z1StH\\\\nZsqTlo4GsCqVJ1sI5lwVd21Be4zU/o1clcfslSUA2z3qhAuJTua+VGSTzIlQXWNl\\\\na4gD4G1N9vxVq9+R5iBhmR1R/HWQQHzcIfGXGfwZZnJ7mCKiyolK5BzjeuXwJAcB\\\\nJd0i292n4X18Qt3QRZpoPNv98zlXmDpOvx0tx7YVtBMnk1PMGCvO9FBMTCSuBAHq\\\\nZcrFZ/WYMC1zuIqMSb8HG/A8uSPZROsXLmg4NFTZVKBdD+qM2KzVKkP0M0CBwm2N\\\\nQ6Rprit71tO9Q3tgA3SAI8+p7TUrlr8Q+d6l2EvZepU=\\\\n=F9qf\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:47:26.387946Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8\\\", \\n \\\"uuid\\\": \\\"425d1364-e30d-405d-8767-81274ab8e7b8\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Length\": \"5248\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0OTowMSBHTVQifX0.DqCuDQ.XSsO2pLvYr9ZLTFVX6hes1KlJNo; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:49:01 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\", \"body\": \"{\\\\\"reply\\\\\": \\\\\"hello\\\\\"}\"}',), 2)": "{\"status\": 400, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"You must encrypt replies client side\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0OTowMiBHTVQifX0.DqCuDg.0qox_zY8ebFaIVMf7cmZq58AnXw; HttpOnly; Path=/\", \"Content-Length\": \"56\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:49:02 GMT\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:02 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2630\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMiBHTVQifX0.DqEakg.WapJ1mFcEOp9c-jO_OpQyMpmIvg; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\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QccEqJq+KT4INB1sF1qgM6GG+9IN3nlniPrBqgmuFT8VfMit6UIKFSuQ7QiMM01l\\\\nyzF2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}", "{\"body\": \"{\\\"reply\\\": \\\"hello\\\"}\", \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"You must encrypt replies client side\\\"\\n}\\n\", \"status\": 400, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMiBHTVQifX0.DqEakw.HI9_y2Vzvg4gIV4oW9d3b93mooY; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:03 GMT\", \"Content-Length\": \"56\"}}"} \ No newline at end of file diff --git a/data/test_failed_single_source.json b/data/test_failed_single_source.json index 544631e58..5cb6b6026 100644 --- a/data/test_failed_single_source.json +++ b/data/test_failed_single_source.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/not there\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMiBHTVQifX0.DqCsfg.GSJj_T6bDKK8eMGxx7EMpvAu0y4; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"166\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\", \"Content-Type\": \"application/json\"}, \"status\": 404}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/not there\"}+1": "{\"headers\": {\"Content-Length\": \"166\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:03 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMyBHTVQifX0.DqEakw.GmE0nwEjrDgbnUq1aydIahPgfuk; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\", \"status\": 404}"} \ No newline at end of file diff --git a/data/test_flag_source.json b/data/test_flag_source.json index 7542194d6..2df523411 100644 --- a/data/test_flag_source.json +++ b/data/test_flag_source.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY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IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+sV42niOI7009\\\\n5Dg1LwNrDloPp1So5gAskKshbOQ97rss5OhTC7DW1NsHlqdJLS3JcGuDK3H14fnJ\\\\nfwIklnMv8VConUt6O7umI/OaVaEmjLGUoucVdxxzs3AOmoXlFASGF8vfubm3QWni\\\\nIP/KIt12CTV+pEOXRkJH4797emmx3f9VV0GuRsLju3I+eVIvpa4oDSIwwQARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UExRNFA3NVo3TDc1MkRPV0I2TE9ZUk9NSEhP\\\\nRUwzN1RGTTNCUjVVNFBBUlozUlg3WFBJWlNUNVVBWFBISkJZM1VZTEdJSVY3VVNS\\\\nQURFRTMyU1VaUlYzWFFNQzc3M0JBSVNJWVZCST0+iQI/BBMBCgApBQJbvxrkAhsv\\\\nBQkB4VPcBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQgimLLlolhdx9/hAA\\\\nim7dinkVkDETUgjAi21b/s4bzR4plSxYEG49Jopruv4kEQf133l8OHmHIUcMSU3T\\\\n3nwWTACAMqw9IhV1vJLslivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"5237\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMyBHTVQifX0.DqCsfw.66XGdzcWDccaxbrr50iM3307nNc; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:23 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\"}}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/flag\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"message\\\": \\\"Source flagged for reply\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Content-Length\": \"44\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:42:24 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNCBHTVQifX0.DqCsgA.SVyzZA2RY19kTtoGn5aYIVKywvQ; HttpOnly; Path=/\"}, \"status\": 200}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msYfScR7Ev\\\\nnimAaXlbM/sWimFEHJWDS0r1Lmr7IvyobzbimMCbF35hy7hxphB2D30OnwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8VFUzVU9XUDZMN1BRQ1M2WE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\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2528\", \"Date\": \"Thu, 11 Oct 2018 09:42:24 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNCBHTVQifX0.DqCsgA.SVyzZA2RY19kTtoGn5aYIVKywvQ; HttpOnly; Path=/\"}}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB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/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"2630\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowNCBHTVQifX0.DqEalA.YnCiXo4a3RR2VnIZtJqYfII1X0o; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:04 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/flag\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Source flagged for reply\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowNSBHTVQifX0.DqEalQ.eYHj2mFSrAWyJ6FnsipX2X22U3A; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:05 GMT\", \"Content-Length\": \"44\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\"}+3": "{\"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:05 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2530\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowNSBHTVQifX0.DqEalQ.eYHj2mFSrAWyJ6FnsipX2X22U3A; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eo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e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_all_replies.json b/data/test_get_all_replies.json index cf632b3a1..203d7ac8e 100644 --- a/data/test_get_all_replies.json +++ b/data/test_get_all_replies.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NTo0MiBHTVQifX0.DqCvng.H3ANc_rMkG7UpTutU3DwmrKh4XI; HttpOnly; Path=/\", \"Content-Length\": \"1971\", \"Date\": \"Thu, 11 Oct 2018 09:55:42 GMT\"}, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/568e17fd-5492-4f99-af5d-9da8095892b0\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"568e17fd-5492-4f99-af5d-9da8095892b0\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nineteen_pyrite-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies/4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"4c0e9be1-e6d0-4124-a59f-15f3e471b779\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-wingless_howler-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies/a7d1ce73-60f5-4a40-a571-4a151a5e8bd2\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"a7d1ce73-60f5-4a40-a571-4a151a5e8bd2\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-wingless_howler-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies/61746472-907a-43e4-9da9-66fa305e5430\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"61746472-907a-43e4-9da9-66fa305e5430\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-corinthian_bran-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies/e6583ca6-c267-49d0-baee-b47a55bbc916\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"e6583ca6-c267-49d0-baee-b47a55bbc916\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-corinthian_bran-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies/4de16fb1-5373-4485-a699-dfb1b4251e6f\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"4de16fb1-5373-4485-a699-dfb1b4251e6f\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNjo1MCBHTVQifX0.DqEbsg.1eoer66-yvWHTTyUVA-eBl7bLUk; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:36:50 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"1957\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}"} \ No newline at end of file diff --git a/data/test_get_all_submissions.json b/data/test_get_all_submissions.json index 46d1c7f7d..bbd1f6923 100644 --- a/data/test_get_all_submissions.json +++ b/data/test_get_all_submissions.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"2049\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNSBHTVQifX0.DqCsgQ.6M0Yht05o8rM_UA6VhLI5iTlCyk; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:25 GMT\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/7445cda3-4bd0-4b73-9c7a-2e1c79c103fc/download\\\", \\n \\\"filename\\\": \\\"1-cephalopod_postage-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/7445cda3-4bd0-4b73-9c7a-2e1c79c103fc\\\", \\n \\\"uuid\\\": \\\"7445cda3-4bd0-4b73-9c7a-2e1c79c103fc\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/59a9fdfe-9c39-49a5-9d67-7e9a0fadef6d/download\\\", \\n \\\"filename\\\": \\\"2-cephalopod_postage-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions/59a9fdfe-9c39-49a5-9d67-7e9a0fadef6d\\\", \\n \\\"uuid\\\": \\\"59a9fdfe-9c39-49a5-9d67-7e9a0fadef6d\\\"\\n }\\n ]\\n}\\n\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:34:56.537133Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwODA5NiwiaWF0IjoxNTM5Mjc5Mjk2fQ.eyJpZCI6MX0.DJS73iQrlXFKmpTAGX5G1kT_35qGJTH5TYB4Vyhe850\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNDo1NiBHTVQifX0.DqEbQA.IY36ZE2JKCoToMoPVznvSrgzgc0; HttpOnly; Path=/\", \"Content-Length\": \"188\", \"Date\": \"Thu, 11 Oct 2018 17:34:56 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/e2d452d4-5073-498b-b66a-17f7d4d08d5c/download\\\", \\n \\\"filename\\\": \\\"1-wingless_howler-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/e2d452d4-5073-498b-b66a-17f7d4d08d5c\\\", \\n \\\"uuid\\\": \\\"e2d452d4-5073-498b-b66a-17f7d4d08d5c\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/46c91d7c-091f-487b-8b0b-c89808b6573e/download\\\", \\n \\\"filename\\\": \\\"2-wingless_howler-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/46c91d7c-091f-487b-8b0b-c89808b6573e\\\", \\n \\\"uuid\\\": \\\"46c91d7c-091f-487b-8b0b-c89808b6573e\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/5ba450ac-ea4d-45b0-8040-bab6510679fe/download\\\", \\n \\\"filename\\\": \\\"1-corinthian_bran-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/5ba450ac-ea4d-45b0-8040-bab6510679fe\\\", \\n \\\"uuid\\\": \\\"5ba450ac-ea4d-45b0-8040-bab6510679fe\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/e9c56553-c926-41a2-a55d-1cc628edf1e7/download\\\", \\n \\\"filename\\\": \\\"2-corinthian_bran-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/e9c56553-c926-41a2-a55d-1cc628edf1e7\\\", \\n \\\"uuid\\\": \\\"e9c56553-c926-41a2-a55d-1cc628edf1e7\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:34:57 GMT\", \"Content-Length\": \"2041\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNDo1NyBHTVQifX0.DqEbQQ.8uz5qe-ivXs3UkFB1zBRxub33uU; HttpOnly; Path=/\"}, \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_current_user.json b/data/test_get_current_user.json index fd7326413..75269354d 100644 --- a/data/test_get_current_user.json +++ b/data/test_get_current_user.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/user\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T09:48:42.486824Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"645c7b1c-6d91-4950-b489-fd4192270c0f\\\"\\n}\\n\", \"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"151\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:48:43 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0ODo0MyBHTVQifX0.DqCt-w.CUELq9HqxVXpsj1BdhUiWnecokI; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"headers\": {\"Content-Length\": \"73\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:08 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOCBHTVQifX0.DqEamA.Rz19VDYyhFF2_UvVptjQBdct478; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/user\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"151\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T17:32:07.242517Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_get_replies_from_source.json b/data/test_get_replies_from_source.json index c528b520e..a93da6a69 100644 --- a/data/test_get_replies_from_source.json +++ b/data/test_get_replies_from_source.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nocturnal differential\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HW4BEACqn0uMSspP8VDVFSxHPAw2pmXcl+G7hqjFx8H8BIIOE+BAWFvB\\\\nLNQaS78mpVhRHNs79cfyUwq0SsRYpjd2WNWGd41JpFqZYZ+S6Y6f4ZCbDCbaMaQ7\\\\neRayWd3lDJP/pyycZ6q7CWbcHYi3A41kTSWhDJD6xJL40sOGUWBMSsfAEKQnOHmw\\\\nF0G0qZOvGcuLyVXx7gAyDnknlFEypFLbEr2Fn7zVPjfqxEfVmYMHnkWTM37nIlVn\\\\nely3nH1GdzQzMU809GajxSsg27StuvyWCkOBitc+cXkNluPjQdGl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pIOBWzxxhv/iClnH5BIgBzUvRhthZFd6WyI4tYSuY4vn7XK\\\\nywboxNqBauMB8qoIM6BpRGdiIaRmzfPEyxCyvm1DN03RjmjS5yVEIHB0vlLQgaU4\\\\n4gUvPqtNOJ0bDXv4QRHOGWBqYodRpDiW9NGbTguhkx4gF2zIq/T1VMWlF1IYEVUB\\\\npVkt0Y/lZs0ma4mjYt8u+7AQPl4UrLJ/n2gF0yGR+10JkAIChlfhSKmgTCRukLu9\\\\ngG4r/eMKIK2JQ95bshFcG6tqwVTLijGd/HqyTtpCJrgc6KS024MDaISBFz82ahgs\\\\n0/T9DHB0Xh6Il3pMPP7XqbMbKhcq2t+pXqWccvGYDYY=\\\\n=nw9g\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:48.829169Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"94daa38e-82d6-4efe-97f8-55b9659f03ea\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nineteen pyrite\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\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yYDluOmzfMqqt14lXRNIPYMevvg\\\\n+lH58t4SXRTv1LlWstdsRBmKEc9VSPCU7y6FTRD1rZQ6JmfukP6xxsWLAWDkjkXY\\\\nQBFrLQI/s3a2jXwwXk31v3hkb7Vk/SxVAywdVQt/ENyfRGklbHEWwGhPUxQ0E7Pe\\\\nWTS5HTO2P1qat9EqgGzOEttcgVyuJdSU4uAQMozNwb046AxZ62UYvW93sgj0MaaO\\\\n7rcxZVY6tRfEYubAIr5nAfKj1P8mwzT0TTEMx6ezSstsrUZROf3ekXLKjdqh6MDL\\\\nJMRiLmGUKnXmwbCM0g7o7AZUVT+i9EdxYiepmAPfXkG3/CjeXBT6XXNdUGFR0TJH\\\\nMGa7E2VGZPyrdrhPkTRRgW1JDuY9wsmn/QsPZT2OylqLy/WbbRlnvoffRSBubfPF\\\\nOF0TRaj38/WRQIDrTo9YeD/2hO0I2yvmNMM9X1ZkLhE8clTnwGjjUKssRTuWBwg3\\\\nKGh33gPjo1sTkEQq3XTFiiKrrtjflbNFilVzIaFa++Jzq6xunyaVL7ECVszMaPAD\\\\n0TKRfY0IP9jXCZsmnYn4rUO/yWa8+P7tuAtmJv9Gq4k6lEK/iwkgRVtydt5zWIzU\\\\n0bUq6WT17kV2ElFWjEa4cR5U2G43pJKVU3wAxClPJeo=\\\\n=UDs5\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:51.475725Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"06ffd7cd-4415-4642-a37a-58ec723b014e\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:53:08 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MzowOCBHTVQifX0.DqCvBA.ORkygLticceZrE9B9S1TWJGhVRg; HttpOnly; Path=/\", \"Content-Length\": \"5240\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:53:09 GMT\", \"Content-Length\": \"1003\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MzowOSBHTVQifX0.DqCvBQ.1q7mFym_1LTlKHUtjoRHMSXDVOw; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj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IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMCBHTVQifX0.DqEamg.dT-dB-JqNy2NCg1RuIf7JxmV4kA; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:10 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"995\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_reply_from_source.json b/data/test_get_reply_from_source.json index c748584d2..598ef056c 100644 --- a/data/test_get_reply_from_source.json +++ b/data/test_get_reply_from_source.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:54:43 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"5240\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NDo0MyBHTVQifX0.DqCvYw.FJ13CKY_OLxiYpptXi8OyU2ik4s; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nocturnal differential\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HW4BEACqn0uMSspP8VDVFSxHPAw2pmXcl+G7hqjFx8H8BIIOE+BAWFvB\\\\nLNQaS78mpVhRHNs79cfyUwq0SsRYpjd2WNWGd41JpFqZYZ+S6Y6f4ZCbDCbaMaQ7\\\\neRayWd3lDJP/pyycZ6q7CWbcHYi3A41kTSWhDJD6xJL40sOGUWBMSsfAEKQnOHmw\\\\nF0G0qZOvGcuLyVXx7gAyDnknlFEypFLbEr2Fn7zVPjfqxEfVmYMHnkWTM37nIlVn\\\\nely3nH1GdzQzMU809GajxSsg27StuvyWCkOBitc+cXkNluPjQdGlgPSb4UaOB23C\\\\nptLkcPgeiUv9PT0D//KLYLXmnem7yOBZpuIV5py2f0oWbp9NiPeXoKqtxC15TIuW\\\\n848kT3BwY/yrNhZmGSC+o0rvetPHrykN2s/i7FISD6ajZj4+Lx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0bDXv4QRHOGWBqYodRpDiW9NGbTguhkx4gF2zIq/T1VMWlF1IYEVUB\\\\npVkt0Y/lZs0ma4mjYt8u+7AQPl4UrLJ/n2gF0yGR+10JkAIChlfhSKmgTCRukLu9\\\\ngG4r/eMKIK2JQ95bshFcG6tqwVTLijGd/HqyTtpCJrgc6KS024MDaISBFz82ahgs\\\\n0/T9DHB0Xh6Il3pMPP7XqbMbKhcq2t+pXqWccvGYDYY=\\\\n=nw9g\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:48.829169Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"94daa38e-82d6-4efe-97f8-55b9659f03ea\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"nineteen pyrite\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HXIBEACtKFiy1Ude/EM7G0tQGVNkRaiN5k2og+3N9I4vHsj/wfmOxMxG\\\\nia0UKGVcVwcObBuvNo6Fwfrrj3ufhGhTHhjObEQP2ISa3XGO3YfsHBBgAu7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SxVAywdVQt/ENyfRGklbHEWwGhPUxQ0E7Pe\\\\nWTS5HTO2P1qat9EqgGzOEttcgVyuJdSU4uAQMozNwb046AxZ62UYvW93sgj0MaaO\\\\n7rcxZVY6tRfEYubAIr5nAfKj1P8mwzT0TTEMx6ezSstsrUZROf3ekXLKjdqh6MDL\\\\nJMRiLmGUKnXmwbCM0g7o7AZUVT+i9EdxYiepmAPfXkG3/CjeXBT6XXNdUGFR0TJH\\\\nMGa7E2VGZPyrdrhPkTRRgW1JDuY9wsmn/QsPZT2OylqLy/WbbRlnvoffRSBubfPF\\\\nOF0TRaj38/WRQIDrTo9YeD/2hO0I2yvmNMM9X1ZkLhE8clTnwGjjUKssRTuWBwg3\\\\nKGh33gPjo1sTkEQq3XTFiiKrrtjflbNFilVzIaFa++Jzq6xunyaVL7ECVszMaPAD\\\\n0TKRfY0IP9jXCZsmnYn4rUO/yWa8+P7tuAtmJv9Gq4k6lEK/iwkgRVtydt5zWIzU\\\\n0bUq6WT17kV2ElFWjEa4cR5U2G43pJKVU3wAxClPJeo=\\\\n=UDs5\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:52:51.475725Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/06ffd7cd-4415-4642-a37a-58ec723b014e\\\", \\n \\\"uuid\\\": \\\"06ffd7cd-4415-4642-a37a-58ec723b014e\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:54:43 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"1003\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NDo0MyBHTVQifX0.DqCvYw.FJ13CKY_OLxiYpptXi8OyU2ik4s; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"d967dbde-d2c7-4f55-98b2-2ae820eb8ae8\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:54:44 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"449\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1NDo0NCBHTVQifX0.DqCvZA.OeNEt2N5NqkGSujcUrEtvzGEsMs; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"filename\\\": \\\"3-nocturnal_differential-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"32c5661b-7e2c-4707-8fdd-61148721c00a\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea/replies/5c614d2b-0371-4272-8bb7-ed2325275fec\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/94daa38e-82d6-4efe-97f8-55b9659f03ea\\\", \\n \\\"uuid\\\": \\\"5c614d2b-0371-4272-8bb7-ed2325275fec\\\"\\n}\\n\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5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Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2629\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMSBHTVQifX0.DqEamw.VieMcDALyGO4xtkbAmgdd_HMz-U; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:11 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"995\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMSBHTVQifX0.DqEamw.VieMcDALyGO4xtkbAmgdd_HMz-U; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:11 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\"}+3": "{\"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:12 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMiBHTVQifX0.DqEanA.F5IaGeYQZ7c8kZLzBx42r47OYEw; HttpOnly; Path=/\", \"Content-Length\": \"445\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\"}, \"status\": 200, \"body\": \"{\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_get_single_source.json b/data/test_get_single_source.json index 8c719558f..b7ed5911e 100644 --- a/data/test_get_single_source.json +++ b/data/test_get_single_source.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNiBHTVQifX0.DqCsgg.20FXbqc0ZpuIdjZSVUK7-Rni2gw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:26 GMT\", \"Content-Length\": \"5236\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOzS/pbj\\\\nrRwfeIpNEeovB5ZzP8GgYyBGJmlTgn6WOdl8LFYDBnEYYZSdzV/dbb7Ro8AdTaz5\\\\nBgIqXQcYozW0ou+6+3uW2ZRkYAd7vPpSTWSczi5YJirhMI080GncU1msYfScR7Ev\\\\nnimAaXlbM/sWimFEH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\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3M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H+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_design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sJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQGgMU7lwLt1QU3Q//\\\\nbnVgz689doE0MHQTk8jkPkpeA+dTipDd2n5sQ1kDHPmyq4rptO14zqxVZwXrVRKf\\\\nPEoS6GIrJltTO30EpR9BVWLQmmZ1B6atop3UvE71Bnu5TI2SWmGPiThg06316SV3\\\\nw+Jpr+Zu4+JWuUF+bhwmh9+Qkaald9Z1K2hv3CJXku+nSQK6OLgn0uebEngllSav\\\\nkv12MgJ1ZLffvydZxeiuZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNiBHTVQifX0.DqCsgg.20FXbqc0ZpuIdjZSVUK7-Rni2gw; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:26 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2528\"}}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\\\\nPW03L1SJSCwYC/l30craQDCG57zUkjR9g5K+tWpZXtfVMc2d8fDSxz9U3khPxAue\\\\n165tVrIFbyRdy/bzVNc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UBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMyBHTVQifX0.DqEanQ.JhUzbQtUDYNcqbhelVEGb3H90Go; HttpOnly; Path=/\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:13 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\"}+2": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\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Ww//\\\\nQccEqJq+KT4INB1sF1qgM6GG+9IN3nlniPrBqgmuFT8VfMit6UIKFSuQ7QiMM01l\\\\nyzF2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMyBHTVQifX0.DqEanQ.JhUzbQtUDYNcqbhelVEGb3H90Go; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:13 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2530\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}}"} \ No newline at end of file diff --git a/data/test_get_single_source_from_string.json b/data/test_get_single_source_from_string.json index d8eda408e..433acd1e4 100644 --- a/data/test_get_single_source_from_string.json +++ b/data/test_get_single_source_from_string.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:27 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNyBHTVQifX0.DqCsgw.KQO_xqUpwAi1vKqLg0lkm18C-Fw; HttpOnly; Path=/\", \"Content-Length\": \"5236\"}, \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4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BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4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zKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2528\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:27 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyNyBHTVQifX0.DqCsgw.KQO_xqUpwAi1vKqLg0lkm18C-Fw; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4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BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n}\\n\", \"status\": 200}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:14 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNCBHTVQifX0.DqEang.L7VrOza7MVY92H8EYjyCr2mVB0c; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/m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v9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\"}+2": "{\"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\\\\nPW03L1SJSCwYC/l30craQDCG57zUkjR9g5K+tWpZXtfVMc2d8fDSxz9U3khPxAue\\\\n165tVrIF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\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n}\\n\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:15 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNSBHTVQifX0.DqEanw.eOwz0Qy3h2kwC9vdDZFFnvDqXeU; HttpOnly; Path=/\", \"Content-Length\": \"2530\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_sources.json b/data/test_get_sources.json index 7c3fc74fa..01382aa27 100644 --- a/data/test_get_sources.json +++ b/data/test_get_sources.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK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S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEG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SxYEG49Jopruv4kEQf133l8OHmHIUcMSU3T\\\\n3nwWTACAMqw9IhV1vJLslivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyOCBHTVQifX0.DqCshA.L_5t9P-IO-dOkXMHMKsdaO1mnig; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:28 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"5236\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"wingless howler\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZMBEACUDbVOFlpWWeOugPWX5dX1sBGaduX1P01XO27dgFUedd7Rqe51\\\\nNLelyIWFocRg+Ee+c0sskEr+zih3s4n+A4Vjyn2fZjapaoHYCbosv8A1C9AXtQip\\\\n6F5k099stXUsl2iP3q5Bq1r4osWXH6z6/5pWYpl8JdLEpbx2K1OmVr44PaCO3wTA\\\\nlzHTYJYtDV9ZvQzJbD76nxD+rsueUKTjTQ32ot51QG0mQmcX3d+PTOlbOodMsu9d\\\\nnOfTf7JeYg/7eLlP3ACVUHgEwNvNvcAVXMpIvHbcAYWM1iHsD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VerNSGBH+MwoNrQp10lmNhIFBKts3iVBkVerXeyHnvJcYpZ\\\\nclZagGth7pfw3RS1QFNZbTcNYnwAp0UBczKvkhwniB/BjIkaHQ3Gu8HYd3jqKEI5\\\\nV2BSPNe4mV5hKIGdelp6BA/yh1LRl6KUzHsDs5qDmgHSRychkBAEbgPsHkRqJjW5\\\\nNm0/CPUMmcX6dEMMY9OwEYVX5ZllfbzOUQlwxx2h6tG6snmewbl3USbGy/QR2Abv\\\\n3N4xRwhgFEhZChmje4KAmV7LQiZTjZg6QXO9LV4YXMr9gerAm/q4TuFk7Z5p5phH\\\\n4egWb6umT6Tj/Mud2vrYSIPu0byroQxSZbU0hYeRGAg=\\\\n=lewJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:12.587473Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\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x3q/QCky/UmRNacDDVvW5qEP/hIQdvmPZJuPgCV\\\\n+z4D+zsDWCT5h4lXeFiS9pUIzIylqafsuG4QjXQCYEsI5C+lu6Tg1eiGCr/G7KMD\\\\nr5909C+O3NYDErFw/PRrcVeaHQmDzaV9iexNNRdPhdtnnSs9QmwumGXvF4ey5wx5\\\\nIxCtyqm/+Ymd/VK6BKSOgzeJG8/EnUOxii/RiTrQgZAAo6DSHAgra6sH+ve+VM1g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:36:33 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"5233\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNjozMyBHTVQifX0.DqEboQ.gTPKFusa5NW6aSv9-LzrsyriAdQ; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_submission.json b/data/test_get_submission.json index 4dbcfd63f..c51c5a025 100644 --- a/data/test_get_submission.json +++ b/data/test_get_submission.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Content-Length\": \"5236\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:29 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyOSBHTVQifX0.DqCshQ.pVvsrom2nWnxn9TzYBiZe-vLbSs; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG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VXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/Gu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TACAMqw9IhV1vJLslivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyOSBHTVQifX0.DqCshQ.pVvsrom2nWnxn9TzYBiZe-vLbSs; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:29 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"1035\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Content-Length\": \"467\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:42:30 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMCBHTVQifX0.DqCshg.iThLayqhlWsZ6xaJnsdzJMs3Ne4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n}\\n\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:16 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"73\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNiBHTVQifX0.DqEaoA.9uLYRCG-kmQ9yET--QWAqlCjqjU; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNyBHTVQifX0.DqEaoQ.sTQOA8NF77Eoq5jevspK3vSH5FY; HttpOnly; Path=/\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:17 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4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+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\"}+2": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:18 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxOCBHTVQifX0.DqEaog.y71M_hEEcATXPfTjaA6nFTi3Ir4; HttpOnly; Path=/\", \"Content-Length\": \"1038\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\"}+3": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:18 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxOCBHTVQifX0.DqEaog.y71M_hEEcATXPfTjaA6nFTi3Ir4; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"468\", \"Vary\": \"Cookie\"}, \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_submission_from_string.json b/data/test_get_submission_from_string.json index 7a0fd145c..15342f296 100644 --- a/data/test_get_submission_from_string.json +++ b/data/test_get_submission_from_string.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Content-Length\": \"5236\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:31 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMSBHTVQifX0.DqCshw.cyggrdw8ojv2X9wh308YdP0rxnc; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8Llf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ZLco5llus4y74A6DFg95EsvIJwrGHv9mQ009jcj8LZxT\\\\nov/9IM16+gJwhNNLSriuLcEnSaYaPMSMgGGY4gis3mFSKaM1GOsTU6zkZnb94E9S\\\\n4rtwHH7aLFFkYnfLZQJ2eyRWfNLQemT5TQVXDxi/DChoDtlOE7hq2BJziFoYgzmv\\\\nQPH3+pAn9jBNC4d2dbR8zFY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT607btrUd4AIwgleT6nQFP4BuPoS9QfxvpjILAMezic59HUleYKssntNY\\\\nCTGf9c874lS93Eu7499qnmXKzo+0KgZ99gDG8t+9GiMkig35Cus70Nr8kaonrp+Q\\\\njIrzb0twV1n2ArknPl2eaUEvH1A4/PoDnOT40g0zlGo9U/3Mwqq6WBGL4jyQlIUQ\\\\n/05a/XmC5OyxPLhr3Bu5TPN6d5Xh0lMWtM0VQDhDdrDZTJ4ueWCevsFFAmx4k62H\\\\nMDoQdrAw4zfkGiobGVqYr5+138COEDBwdk+0MsTZsizCsKO2CdX+sV42niOI7009\\\\n5Dg1LwNrDloPp1So5gAskKshbOQ97rss5OhTC7DW1NsHlqdJLS3JcGuDK3H14fnJ\\\\nfwIklnMv8VConUt6O7umI/OaVaEmjLGUoucVdxxzs3AOmoXlFASGF8vfubm3QWni\\\\nIP/KIt12CTV+pEOXRkJH4797emmx3f9VV0GuRsLju3I+eVIvpa4oDSIwwQARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UExRNFA3NVo3TDc1MkRPV0I2TE9ZUk9NSEhP\\\\nRUwzN1RGTTNCUjVVNFBBUlozUlg3WFBJWlNUNVVBWFBISkJZM1VZTEdJSVY3VVNS\\\\nQURFRTMyU1VaUlYzWFFNQzc3M0JBSVNJWVZCST0+iQI/BBMBCgApBQJbvxrkAhsv\\\\nBQkB4VPcBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQgimLLlolhdx9/hAA\\\\nim7dinkVkDETUgjAi21b/s4bzR4plSxYEG49Jopruv4kEQf133l8OHmHIUcMSU3T\\\\n3nwWTACAMqw9IhV1vJLslivRfzKBd/voep+TIjUd/H2zvdEFhOXcobV1gQ9Rb0Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:31 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMSBHTVQifX0.DqCshw.cyggrdw8ojv2X9wh308YdP0rxnc; HttpOnly; Path=/\", \"Content-Length\": \"1035\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:32 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"467\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMiBHTVQifX0.DqCsiA.9r2is49W5HKWwPk__Gpn49ymXA4; HttpOnly; Path=/\"}, \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxOSBHTVQifX0.DqEaow.ZmRzzOfpPQKIxlOmmCIZiEEFZlc; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:19 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"2629\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\\\\nPW03L1SJSCwYC/l30craQDCG57zUkjR9g5K+tWpZXtfVMc2d8fDSxz9U3khPxAue\\\\n165tVrIFbyRdy/bzVNcw7nvxF66E08tM/DIasPkakQLm5c+VC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n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\"}+2": "{\"status\": 200, \"headers\": {\"Content-Length\": \"1038\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:32:20 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMCBHTVQifX0.DqEapA.vLvVcP3Gym1mhTzMw1y_ltIMvR0; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\"}+3": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMCBHTVQifX0.DqEapA.vLvVcP3Gym1mhTzMw1y_ltIMvR0; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Content-Length\": \"468\", \"Date\": \"Thu, 11 Oct 2018 17:32:20 GMT\"}, \"status\": 200, \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_submissions.json b/data/test_get_submissions.json index 8f8fbe52b..d8c44f3eb 100644 --- a/data/test_get_submissions.json +++ b/data/test_get_submissions.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMyBHTVQifX0.DqCsiQ.GZRTsp11kDQJu2T90OF8c20aMY4; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Content-Length\": \"5236\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:42:33 GMT\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/T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IJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\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\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 09:42:33 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozMyBHTVQifX0.DqCsiQ.GZRTsp11kDQJu2T90OF8c20aMY4; HttpOnly; Path=/\", \"Content-Length\": \"1035\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778/download\\\", \\n \\\"filename\\\": \\\"1-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/ed695db9-8934-49b9-aa84-13da718b4778\\\", \\n \\\"uuid\\\": \\\"ed695db9-8934-49b9-aa84-13da718b4778\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf/download\\\", \\n \\\"filename\\\": \\\"2-indignant_holism-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions/f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\", \\n \\\"uuid\\\": \\\"f06eeebd-c8f5-4509-85eb-5af91a34f2cf\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\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rBqgmuFT8VfMit6UIKFSuQ7QiMM01l\\\\nyzF2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMSBHTVQifX0.DqEapQ.T68qYXo6bk97DCq_v50cqL58UTs; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:21 GMT\", \"Content-Type\": \"application/json\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\"}+2": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMiBHTVQifX0.DqEapg.RGKv8JAvZ4uaEOEKYK0EsjiUHak; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:22 GMT\", \"Content-Length\": \"1038\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_wrong_submissions.json b/data/test_get_wrong_submissions.json index d2ca2858b..712d0dee5 100644 --- a/data/test_get_wrong_submissions.json +++ b/data/test_get_wrong_submissions.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLhSyOz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WR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/SQQAT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a15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:34 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"5236\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNCBHTVQifX0.DqCsig.d-dD1_UDElqeAQBZ9FmzHEtCVjo; HttpOnly; Path=/\"}}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources/rofl-missing/submissions\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"status\": 404, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNSBHTVQifX0.DqCsiw.DEH6ebEPcsbLK9H5adCZ6XjyK1A; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"166\", \"Date\": \"Thu, 11 Oct 2018 09:42:35 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wW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D6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"2629\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:22 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMiBHTVQifX0.DqEapg.RGKv8JAvZ4uaEOEKYK0EsjiUHak; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/rofl-missing/submissions\"}+2": "{\"version\": \"0.1.1\", \"status\": 404, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:23 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMyBHTVQifX0.DqEapw.nTMk5oueFdGVGcFeYoiAbI7eJCU; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"166\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_reply_source.json b/data/test_reply_source.json index ff66137db..33f32bc29 100644 --- a/data/test_reply_source.json +++ b/data/test_reply_source.json @@ -1 +1 @@ -{"(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"pyrrhic bullfinch\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/HCUBEAC91OgTBsFOm+JJGl7i+jS/oR6ARJM88227D0YjqHJgoCTriTbt\\\\nrVcqgYK1w0zS2p60UIAiuPBKHkRS1Qs362AYvi8XJQwt6bmaz7Rg09j5ctugmN+L\\\\n/4lDHtVgs08Nw0BkOvj/ZGAaSHS72DI8XoPNoZ8GNSRYO/JWZD1lz3QxT5vstNbU\\\\nj6514BWs/tfW9jItGBbycUSTaPeAuez20ipqn9VoaTMWDcl1r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jqrIA+NKVNiAUy9J8yFZ5VEGHPwxLLJX3lnooxjuxg52oI9V\\\\nn2rEzf3GNXA7+xGqvMCeetHUFONUWE56OCgySULi3ptmQlraQI66DWMn/QBMYrFF\\\\nGE7CA3Vki4JnvX5GwbbKhpOqef/xJsInHWdfZZFT21P45vF2s4fvAkAwjVekur14\\\\nKIbe7kbWYuQBG2hhC6TWd9M6Gwta0uQWTz6UBB+gz7RoRqsDKNU1dlHmbQLjClr6\\\\niTC+NNPrKqzsE62+LUv5srmTuMCRTSPwWhqCKH7Av9FjqUPiWo9Yu8e/oJZcRl72\\\\nG863e0wI2vaPUjxbd2jCGs+WxHACWu/2/CcF+4ZqUVrzdxockIRJQEz4a0L8EGuc\\\\nLqzFDGlTiJCPb6umd5aoRyU3eSKAb1fhhZyUt/DRTS0=\\\\n=l0jn\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:47:19.113278Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\", \\n \\\"uuid\\\": \\\"7252d38e-3b89-41a2-b65b-83b3a54ef79f\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"holier-than-thou natural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wECHgECF4AACgkQB4I9PSjpdUJPiBAA\\\\ngDzkml+OCgaWfbIJGCCkhqMMqq30FlfBx0lU93/G5GBQQicmV5WBS9wfAU+TuKVY\\\\n79y1jB067nfwaN7ya60UrjU+zHSVVWvpLvMNKMBV/ZdGgpJ3VNwW5S78yKyPSMhR\\\\nN9gnPOFjpv+FxZg8yHRDH/C4xk4QkwF24yKGZMlhJ5ejXIrfhEnktxW6RbXLy+qR\\\\nYalZnDIC4NWKwzqUj+oafZibdaYhDgXg2l22E7Q+oKYa6JhadIrgcSKya+2diI+S\\\\nojK6P+bYzZ2S9YpuKiLwr8e2Zd4+QJPlcMlAHtv74OXrSBYd3YxfR22g386udvB5\\\\nfhOJZ2KMvM4eY62aVZP10r8qq3+TcNMhbvds3+onP9m3AZjpHu3qfjIxsU5z1StH\\\\nZsqTlo4GsCqVJ1sI5lwVd21Be4zU/o1clcfslSUA2z3qhAuJTua+VGSTzIlQXWNl\\\\na4gD4G1N9vxVq9+R5iBhmR1R/HWQQHzcIfGXGfwZZnJ7mCKiyolK5BzjeuXwJAcB\\\\nJd0i292n4X18Qt3QRZpoPNv98zlXmDpOvx0tx7YVtBMnk1PMGCvO9FBMTCSuBAHq\\\\nZcrFZ/WYMC1zuIqMSb8HG/A8uSPZROsXLmg4NFTZVKBdD+qM2KzVKkP0M0CBwm2N\\\\nQ6Rprit71tO9Q3tgA3SAI8+p7TUrlr8Q+d6l2EvZepU=\\\\n=F9qf\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:47:26.387946Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/425d1364-e30d-405d-8767-81274ab8e7b8\\\", \\n \\\"uuid\\\": \\\"425d1364-e30d-405d-8767-81274ab8e7b8\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MDowNCBHTVQifX0.DqCuTA.yN6ji-BR5TcdHjoWm3sRrFYXhgU; HttpOnly; Path=/\", \"Content-Length\": \"5248\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:50:04 GMT\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/7252d38e-3b89-41a2-b65b-83b3a54ef79f/replies\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\", \"body\": \"{\\\\\"reply\\\\\": \\\\\"-----BEGIN PGP MESSAGE-----\\\\\\\\n\\\\\\\\nhQIMA/uCql0ybaddAQ//dg2iojyiyXBaUzKbPaL9+FlEEvraxXO+BbhcsbEdLI5E\\\\\\\\nKYxP5xb1LEOdaJjUcQaPjSARPnFbLzq3vsafZCBrEHtMWnSWxEpxbI1/DO+/Wbk1\\\\\\\\nT+ZVltaAdOIulfuMlIlL4rVCbprg+QUQbsbtIIOFdXpvuS1kQdv+F/sfYsFQanQw\\\\\\\\nV6u/yz3hgyymUyoBfZOXUfpFQ/t759s3rt3OGvwTzOx6o8Q3X+cKypwYsGsHzAUr\\\\\\\\n/N2Ggy6hYVzDj1czjtgUF2EWyKKfTN2RO9y+E0PYnu7C6QN41dx4yPsXFq16kOWC\\\\\\\\nLDyeXW2A/3/fGqp9176V4DRHMkUB6WkkXnekJBiyar1rG7WJ09KNdXGKJw6tjlqT\\\\\\\\nz4mnjgkZopSbuwJJgs+RZFddpGU31PSQg3ODWZRmSQbL/7lFtsJCY0yFjGoEdJFw\\\\\\\\npg5nJ6uOQN6bWPdM47nEPweFgNBIPmQccm0ayewaxvpIgTH+okBlLMPxnDg51vaA\\\\\\\\nF7dzZP4SdNQuBkHKq3DW7tu21+haa5YcjY5vJry9o5Fu9qJJadiI8Cg0JJqTVsUs\\\\\\\\n7Vu4eK1F9popI5hzdRBvBIdNB4LlIJiYmMKxD7l5yyOXSdoyINPU04PwxM3yO6QH\\\\\\\\n5Uw7gVNYCvgKSHAvfFnYAjPSd1m7CPW/aI2EjIHMBf+8FEyyWdHduPCMHZhUZ5XS\\\\\\\\nVAFdU++LS7PKxIFsXKtkHSMmO+GRfI/+SrVmGfw1YJbSmhaRAPk5ChqS7RQMgz/j\\\\\\\\nt+mAINV0vHUNAJkMW/QZXgdVw+eca0ITs/1u3fKsBlmQNv4Efg==\\\\\\\\n=686S\\\\\\\\n-----END PGP MESSAGE-----\\\\\\\\n\\\\\\\\n\\\\\"}\"}',), 2)": "{\"status\": 201, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Your reply has been stored\\\"\\n}\\n\", \"headers\": {\"Content-Length\": \"46\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:50:05 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo1MDowNSBHTVQifX0.DqCuTQ.aO1H1VTbl7JXbedGN79hyP9M4tE; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqc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LhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Length\": \"2629\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNCBHTVQifX0.DqEaqA.F81DnYh6XWL90sT4uI6iuLYIpYU; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:24 GMT\"}, \"version\": \"0.1.1\"}", "{\"body\": \"{\\\"reply\\\": \\\"-----BEGIN PGP MESSAGE-----\\\\n\\\\nhQIMA/uCql0ybaddAQ//dg2iojyiyXBaUzKbPaL9+FlEEvraxXO+BbhcsbEdLI5E\\\\nKYxP5xb1LEOdaJjUcQaPjSARPnFbLzq3vsafZCBrEHtMWnSWxEpxbI1/DO+/Wbk1\\\\nT+ZVltaAdOIulfuMlIlL4rVCbprg+QUQbsbtIIOFdXpvuS1kQdv+F/sfYsFQanQw\\\\nV6u/yz3hgyymUyoBfZOXUfpFQ/t759s3rt3OGvwTzOx6o8Q3X+cKypwYsGsHzAUr\\\\n/N2Ggy6hYVzDj1czjtgUF2EWyKKfTN2RO9y+E0PYnu7C6QN41dx4yPsXFq16kOWC\\\\nLDyeXW2A/3/fGqp9176V4DRHMkUB6WkkXnekJBiyar1rG7WJ09KNdXGKJw6tjlqT\\\\nz4mnjgkZopSbuwJJgs+RZFddpGU31PSQg3ODWZRmSQbL/7lFtsJCY0yFjGoEdJFw\\\\npg5nJ6uOQN6bWPdM47nEPweFgNBIPmQccm0ayewaxvpIgTH+okBlLMPxnDg51vaA\\\\nF7dzZP4SdNQuBkHKq3DW7tu21+haa5YcjY5vJry9o5Fu9qJJadiI8Cg0JJqTVsUs\\\\n7Vu4eK1F9popI5hzdRBvBIdNB4LlIJiYmMKxD7l5yyOXSdoyINPU04PwxM3yO6QH\\\\n5Uw7gVNYCvgKSHAvfFnYAjPSd1m7CPW/aI2EjIHMBf+8FEyyWdHduPCMHZhUZ5XS\\\\nVAFdU++LS7PKxIFsXKtkHSMmO+GRfI/+SrVmGfw1YJbSmhaRAPk5ChqS7RQMgz/j\\\\nt+mAINV0vHUNAJkMW/QZXgdVw+eca0ITs/1u3fKsBlmQNv4Efg==\\\\n=686S\\\\n-----END PGP MESSAGE-----\\\\n\\\\n\\\"}\", \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Your reply has been stored\\\"\\n}\\n\", \"status\": 201, \"headers\": {\"Content-Length\": \"46\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:25 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNSBHTVQifX0.DqEaqQ.jPU2jPpllUP6g6aqkwKg8TLGuIo; HttpOnly; Path=/\"}}"} \ No newline at end of file diff --git a/data/test_star_add_remove.json b/data/test_star_add_remove.json index 49a99ed42..2d5ade1b4 100644 --- a/data/test_star_add_remove.json +++ b/data/test_star_add_remove.json @@ -1 +1 @@ -{"(('{\"method\": \"POST\", \"path_query\": \"api/v1/token\", \"body\": \"{\\\\\"username\\\\\": \\\\\"journalist\\\\\", \\\\\"passphrase\\\\\": \\\\\"correct horse battery staple profanity oil chewy\\\\\"}\"}',), 1)": "{\"status\": 200, \"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-11T17:42:22.276983Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTI3OTc0MiwiaWF0IjoxNTM5MjUwOTQyfQ.eyJpZCI6MX0.deAUus1Tq6GC3PPUKHU5WVoQPEqb3Tfee_MgzvEPh78\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjoyMSBHTVQifX0.DqCsfg.3c0Cx31IxE__yYfvDeJNG4dkDbw; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 09:42:22 GMT\"}, \"version\": \"0.1.1\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 1)": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tKxO5iTOFGENbA+vJ9d\\\\npNYJfCmThZFMtdx3j0XBHmDKcZ7rZtsyoQKPESwSXDnrdzip/TriEGo4gSzo4zp6\\\\nnBdxHmJOywihxgKxta0FxrtZvSlIXoPiPpmvmdaIQOqmsGvamhW1jLh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28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\\\npii8L25cGWAFD5XBf7h0Rh1L4OrbbPWo5Lp1wfGg4oJnV+KmA3QF8aC2SdTfytoI\\\\nlXv9Yu+UqfmYNBIt4WrVDLjChN0993vuDuGckEtqOBeCHcZnFzR07YjiVKLSmuUu\\\\nub/S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n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 09:42:35 GMT\", \"Content-Length\": \"5236\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNSBHTVQifX0.DqCsiw.DEH6ebEPcsbLK9H5adCZ6XjyK1A; HttpOnly; Path=/\"}}", "(('{\"method\": \"POST\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 2)": "{\"version\": \"0.1.1\", \"status\": 201, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:36 GMT\", \"Content-Length\": \"30\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNiBHTVQifX0.DqCsjA.zsGuf7s5PhVGgAUV4HrDRtCJA4Q; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"message\\\": \\\"Star added\\\"\\n}\\n\"}", "(('{\"method\": \"delete\", \"path_query\": \"api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 3)": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 09:42:37 GMT\", \"Content-Length\": \"32\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNyBHTVQifX0.DqCsjQ._M3tpW647dvYvitT7zMcEovWUBI; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"message\\\": \\\"Star removed\\\"\\n}\\n\"}", "(('{\"method\": \"GET\", \"path_query\": \"api/v1/sources\", \"headers\": \"{\\\\\"Content-Type\\\\\": \\\\\"application/json\\\\\", \\\\\"Accept\\\\\": \\\\\"application/json\\\\\"}\"}',), 4)": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Content-Length\": \"5236\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 09:42:37 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxMTo0MjozNyBHTVQifX0.DqCsjQ._M3tpW647dvYvitT7zMcEovWUBI; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"indignant holism\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuEBEAC2cRgB7M+ZfXLdeRPrFA4FSoetw7mwsqwAL1dRF5ZykfF+r/bw\\\\nwXdMfeZjvrEnw+ze1rhEeKQ1wEpQSe7trN2dt5QEnkHMuoWU877e8g/zc/pGaB+p\\\\nDp4hVUDpB3r/XZr5ps3k+Wy7o7cQnGpcwVR/4WBU+Gay8LlfVeZ8INUgJXMcq9zi\\\\nywDg7HyQQEcYdkObGTPUZh/lHLY2Fs9HeQIrI5aQ2mTOee7+7Uz/F2vUafrvNCUa\\\\nP42eudxfGW9ERK0a4tkLh/PLzUchbqLT0HAT8GlHDm47f9fBQ3OOgxG++ntbXWQA\\\\neBb9u4C9nkgK+GXSKmFjTrfkozclIL03rYKxyJL+73z38tK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FY157dKs5cQl8lD/D+H+oF7Q++8JNg5g4nPed+riOnS\\\\nhmnOApLiaiVsFJf/FbqS1tNNHXIJ2Lcmtb8rzv0tglfMmCL8KVlHnHKdRfIb0ZGY\\\\nYebZNuo7H/XidCqoIYMXJjg2TU28cFUWR5gSdgFoISCX+0KFAgy9N5f9K/cF/Rbv\\\\nm0FfJP35Eh0Ln64ObQb2mnCi521Bm+0OI4YX9sBujKgorFuGw/Gl5PxN+Ggv9fTa\\\\nPI9lYaZCIRIfe+lxYd2A263evQblZPgfVKQ/t/R60rY=\\\\n=egxS\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:54.702250Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\", \\n \\\"uuid\\\": \\\"3512c5bf-d362-4e3c-baef-b1dbc4505c75\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"cephalopod postage\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/GuQBEADeRoqAXBhV/MTB4ljr//73Bh0GHxHTDrKJpBwJWS1V+zKUd9G3\\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Br\\\\nnuviyQis1z5Th2xz9XIiQ+il7iEEGgTaY7dAUa+cNU4qLwsLiIT+0Ti4EHWEATWU\\\\nbhgnglrPJH9grbmI1h5ZYGU4wbdc8DH589Wtd6k16hbdcsF0cSucFvMn3v3X6n+K\\\\n5bCa15lVprEeO9xe09C607KLq/IoCACixh0ROJojvY/pQM5wSlk6KHjXGgiY+5T7\\\\nvbvVWKZ5etOUH25wi8vYIm0/ScRd9iOWrsEm6KRiCpaynCeLUpyH0tv1xqvk4IDb\\\\nnNYpgmIHgAV1lnTYXG06QsfKY+bG88a9DDWH+5/hY2X03wU9FHrGmV6dYs9qNvui\\\\ncwHFRATPMNNkfKy/Hcnero2hADZUfm8RfZiTgu3+YYRX73CogGjcAmB8Ne6OxMv+\\\\niI+ruaP9+Ef7Dw1kmYuZ6wpx604yVMXukkQ+lpaq+2Fh89Efm3oP7rycXmu/gvs/\\\\naQ4DeHbeqhkHwdVSxaG8PqAbJMH9DH0l8FdTxvuFzwigPR0PcRRFK00SV9xFLWPp\\\\nwPTnOnqEo+GL8D7d3tHx9uevnQZFXXJR1XEMFyUEBLI=\\\\n=DpUJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T09:41:58.769658Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/805b383d-0d44-4dd8-a2c0-18c5d0318801\\\", \\n \\\"uuid\\\": \\\"805b383d-0d44-4dd8-a2c0-18c5d0318801\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:25 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNSBHTVQifX0.DqEaqQ.jPU2jPpllUP6g6aqkwKg8TLGuIo; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 5, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\\\\nPW03L1SJSCwYC/l30craQDCG57zUkjR9g5K+tWpZXtfVMc2d8fDSxz9U3khPxAue\\\\n165tVrIFbyRdy/bzVNcw7nvxF66E08tM/DIasPkakQLm5c+VC06aVBIVDwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UlZNTjJOWEc3UFlDWEdJTlNLVjNMVlpHUEEz\\\\nWFJNUUNKTjRIWURIUDJBNE1QU1U0NzI0SEFVVkZQVklNTDVIQU9LREJJNkVWTElX\\\\nREMyNUg2RVVTTkRHVklRWEhWSk4yUVRBUUpCUT0+iQI/BBMBCgApBQJbv4j1Ahsv\\\\nBQkB4OXLBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQXPcs0GGMHTaWWw//\\\\nQccEqJq+KT4INB1sF1qgM6GG+9IN3nlniPrBqgmuFT8VfMit6UIKFSuQ7QiMM01l\\\\nyzF2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\"}+2": "{\"status\": 201, \"body\": \"{\\n \\\"message\\\": \\\"Star added\\\"\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:26 GMT\", \"Content-Length\": \"30\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNiBHTVQifX0.DqEaqg.a8ZrYgMZ_USIr99OziFFHfiNKc8; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"delete\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\"}+3": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNyBHTVQifX0.DqEaqw.RQiJ1vTnVKZX1rR1P8m8knwF_TQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:27 GMT\", \"Content-Length\": \"32\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Star removed\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+4": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNyBHTVQifX0.DqEaqw.RQiJ1vTnVKZX1rR1P8m8knwF_TQ; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:27 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 5, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBW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E45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}"} \ No newline at end of file From 9714c45b54b56b43a045ca8667f09a9cde5566c6 Mon Sep 17 00:00:00 2001 From: redshiftzero Date: Fri, 12 Oct 2018 18:04:00 -0700 Subject: [PATCH 12/14] Start merging API and APIProxy classes --- sdclientapi/__init__.py | 203 ++++++++---- sdclientapi/proxyapi.py | 701 ---------------------------------------- tests/test_apiproxy.py | 5 +- tests/utils/__init__.py | 2 +- 4 files changed, 147 insertions(+), 764 deletions(-) delete mode 100644 sdclientapi/proxyapi.py diff --git a/sdclientapi/__init__.py b/sdclientapi/__init__.py index cdb87ec93..411877a33 100644 --- a/sdclientapi/__init__.py +++ b/sdclientapi/__init__.py @@ -1,12 +1,41 @@ from pprint import pprint import os +import configparser import json import requests +from subprocess import PIPE, Popen from typing import Optional, Dict, List, Tuple from .sdlocalobjects import * -from .proxyapi import APIProxy, json_query + + +proxyvmname = "sd-journalist" + + +def json_query(data): + """ + Takes a json based query and passes to the network proxy. + Returns the JSON output from the proxy. + """ + global proxyvmname + config = configparser.ConfigParser() + try: + if os.path.exists("/etc/sd-sdk.conf"): + config.read("/etc/sd-sdk.conf") + proxyvmname = config["proxy"]["name"] + except: + pass # We already have a default name + + p = Popen( + ["/usr/lib/qubes/qrexec-client-vm", proxyvmname, "securedrop.Proxy"], + stdin=PIPE, + stdout=PIPE, + ) + p.stdin.write(data.encode("utf-8")) + d = p.communicate() + output = d[0].decode("utf-8") + return output.strip() class API: @@ -20,7 +49,7 @@ class API: :returns: An object of API class. """ - def __init__(self, address, username, passphrase, totp) -> None: + def __init__(self, address, username, passphrase, totp, proxy=False) -> None: """ Primary API class, this is the only thing which will make network call. """ @@ -31,6 +60,29 @@ def __init__(self, address, username, passphrase, totp) -> None: self.totp = totp # type: str self.token = {"token": "", "expiration": ""} self.auth_header = {"Authorization": ""} # type: Dict + self.proxy = proxy # type: bool + + def _send_json_request(self, method, path_query, body=None, headers=None): + if self.proxy: # We are using the Qubes securedrop-proxy + if method == "POST": + data = {"method": method, "path_query": path_query, "body": body, "headers": headers} + elif method == "GET" or method == "DELETE": + data = {"method": method, "path_query": path_query, "headers": headers} + + result = json.loads(json_query(json.dumps(data, sort_keys=True))) + return json.loads(result["body"]), result["status"] + + else: # We are not using the Qubes securedrop-proxy + if method == "POST": + result = requests.post(self.server + path_query, + data=body) + elif method == "GET": + result = requests.get(self.server + path_query, + headers=headers) + elif method == "DELETE": + result = requests.delete(self.server + path_query, headers=headers) + + return result.json(), result.status_code def authenticate(self, totp="") -> bool: """ @@ -46,9 +98,12 @@ def authenticate(self, totp="") -> bool: "one_time_code": totp, } - token = requests.post(self.server + "api/v1/token", data=json.dumps(user_data)) + method = "POST" + path_query = "api/v1/token" + body = json.dumps(user_data) + try: - token_data = token.json() + token_data, status_code = self._send_json_request(method, path_query, body=body) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") if not "expiration" in token_data: @@ -71,11 +126,12 @@ def get_sources(self) -> List[Source]: :returns: List of Source objects. """ - url = self.server + "api/v1/sources" + path_query = "api/v1/sources" + method = "GET" try: - res = requests.get(url, headers=self.auth_header) - data = res.json() + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -98,15 +154,16 @@ def get_source(self, source: Source) -> Source: :param source: Source object containing only source's uuid value. :returns: Source object fetched from server for the given UUID value. """ - url = self.server + "api/v1/sources/{}".format(source.uuid) + path_query = "api/v1/sources/{}".format(source.uuid) + method = "GET" try: - res = requests.get(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -134,15 +191,16 @@ def delete_source(self, source: Source) -> bool: :param source: Source object containing only source's uuid value. :returns: True if successful, raises Errors in case of wrong values. """ - url = self.server + "api/v1/sources/{}".format(source.uuid) + path_query = "api/v1/sources/{}".format(source.uuid) + method = "DELETE" try: - res = requests.delete(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -174,11 +232,14 @@ def add_star(self, source: Source) -> bool: :param source: The source object to whom we want add a star. :returns: True if successful, raises Error otherwise. """ - url = self.server.rstrip("/") + source.add_star_url + path_query = "api/v1/sources/{}/add_star".format(source.uuid) + method = "POST" try: - res = requests.post(url, headers=self.auth_header) - data = res.json() + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) + if status_code == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -193,11 +254,14 @@ def remove_star(self, source: Source) -> bool: :param source: Source object to remove the star from. :returns: True if successful, raises Error otherwise. """ - url = self.server.rstrip("/") + source.remove_star_url + path_query = "api/v1/sources/{}/remove_star".format(source.uuid) + method = "DELETE" try: - res = requests.delete(url, headers=self.auth_header) - data = res.json() + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) + if status_code == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -213,15 +277,16 @@ def get_submissions(self, source: Source) -> List[Submission]: :param source: Source object for whom we want to find all the submissions. :returns: List of Submission objects. """ - url = self.server.rstrip("/") + source.submissions_url + path_query = "api/v1/sources/{}/submissions".format(source.uuid) + method = "GET" try: - res = requests.get(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing submission {}".format(source.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -245,17 +310,18 @@ def get_submission(self, submission: Submission) -> Submission: :returns: Updated submission object from the server. """ source_uuid = submission.source_url.split("/")[-1] - url = self.server.rstrip("/") + "/api/v1/sources/{}/submissions/{}".format( + path_query = "api/v1/sources/{}/submissions/{}".format( source_uuid, submission.uuid ) + method = "GET" try: - res = requests.get(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing submission {}".format(submission.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -282,11 +348,12 @@ def get_all_submissions(self) -> List[Submission]: :returns: List of Submission objects. """ - url = self.server.rstrip("/") + "/api/v1/submissions" + path_query = "api/v1/submissions" + method = "GET" try: - res = requests.get(url, headers=self.auth_header) - data = res.json() + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -313,17 +380,18 @@ def delete_submission(self, submission: Submission) -> bool: # from local submission (not fetched from server) objects. # See the *from_string for an example. source_uuid = submission.source_url.split("/")[-1] - url = self.server.rstrip("/") + "/api/v1/sources/{}/submissions/{}".format( + path_query = "api/v1/sources/{}/submissions/{}".format( source_uuid, submission.uuid ) + method = "DELETE" try: - res = requests.delete(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing submission {}".format(submission.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -395,11 +463,16 @@ def flag_source(self, source: Source) -> bool: :param source: Source object we want to flag. :returns: True if successful, raises Error otherwise. """ - url = self.server.rstrip("/") + "/api/v1/sources/{}/flag".format(source.uuid) + path_query = "api/v1/sources/{}/flag".format(source.uuid) + method = "POST" try: - res = requests.post(url, headers=self.auth_header) - data = res.json() + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) + + if status_code == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) + except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -420,11 +493,13 @@ def get_current_user(self): 'username': 'journalist' } """ - url = self.server.rstrip("/") + "/api/v1/user" + path_query = "api/v1/user" + method = "GET" try: - res = requests.get(url, headers=self.auth_header) - data = res.json() + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) + except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -441,17 +516,18 @@ def reply_source(self, source: Source, msg: str) -> bool: :param source: Source object we want to reply. :param msg: Encrypted message with Source's GPG public key. """ - url = self.server.rstrip("/") + source.replies_url - + path_query = "api/v1/sources/{}/replies".format(source.uuid) + method = "POST" reply = {"reply": msg} try: - res = requests.post(url, headers=self.auth_header, data=json.dumps(reply)) + data, status_code = self._send_json_request(method, path_query, + body=json.dumps(reply), + headers=self.auth_header) - if res.status_code == 400: + if status_code == 400: raise ReplyError(res.json()["message"]) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -470,15 +546,16 @@ def get_replies_from_source(self, source: Source) -> List[Reply]: :param source: Source object containing only source's uuid value. :returns: List of Reply objects. """ - url = self.server + "api/v1/sources/{}/replies".format(source.uuid) + path_query = "api/v1/sources/{}/replies".format(source.uuid) + method = "GET" try: - res = requests.get(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -500,17 +577,16 @@ def get_reply_from_source(self, source: Source, reply_uuid: str) -> Reply: :param reply_uuid: UUID of the reply. :returns: A reply object """ - url = self.server + "api/v1/sources/{}/replies/{}".format( - source.uuid, reply_uuid - ) + path_query = "api/v1/sources/{}/replies/{}".format(source.uuid, reply_uuid) + method = "GET" try: - res = requests.get(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -527,12 +603,19 @@ def get_all_replies(self) -> List[Reply]: :returns: List of Reply objects. """ - url = self.server + "api/v1/replies" + source_uuid = submission.source_url.split("/")[-1] + path_query = "/api/v1/sources/{}/submissions/{}/download".format( + source_uuid, submission.uuid + ) + method = "GET" try: - res = requests.get(url, headers=self.auth_header) + data, status_code = self._send_json_request(method, path_query, + headers=self.auth_header) + + if status_code == 404: + raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") diff --git a/sdclientapi/proxyapi.py b/sdclientapi/proxyapi.py deleted file mode 100644 index 6c7eff003..000000000 --- a/sdclientapi/proxyapi.py +++ /dev/null @@ -1,701 +0,0 @@ -from pprint import pprint -import os -import json -import configparser -from subprocess import PIPE, Popen - -from .sdlocalobjects import * - -from typing import Optional, Dict, List, Tuple - - -proxyvmname = "sd-journalist" - - -def json_query(data): - """ - Takes a json based query and passes to the network proxy. - Returns the JSON output from the proxy. - """ - global proxyvmname - config = configparser.ConfigParser() - try: - if os.path.exists("/etc/sd-sdk.conf"): - config.read("/etc/sd-sdk.conf") - proxyvmname = config["proxy"]["name"] - except: - pass # We already have a default name - - p = Popen( - ["/usr/lib/qubes/qrexec-client-vm", proxyvmname, "securedrop.Proxy"], - stdin=PIPE, - stdout=PIPE, - ) - p.stdin.write(data.encode("utf-8")) - d = p.communicate() - output = d[0].decode("utf-8") - return output.strip() - - -class APIProxy: - """ - This is class to do all the network calls to the SecureDrop API server. - - :param address: Server URL (http://localhost:8081/) - :param username: Journalist username - :param passphrase: Journalist passphrase - :param totp: Current TOTP value - :returns: An object of API class. - """ - - def __init__(self, address, username, passphrase, totp) -> None: - """ - Primary API class, this is the only thing which will make network call. - """ - - self.server = address # type: str - self.username = username # type: str - self.passphrase = passphrase # type: str - self.totp = totp # type: str - self.token = {"token": "", "expiration": ""} - self.auth_header = {"Authorization": ""} # type: Dict - - def authenticate(self, totp="") -> bool: - """ - Authenticate the user and fetches the token from the server. - - :returns: True if authentication is successful, raise AuthError otherwise. - """ - if not totp: - totp = self.totp - user_data = { - "username": self.username, - "passphrase": self.passphrase, - "one_time_code": totp, - } - method = "POST" - path_query = "api/v1/token" - body = json.dumps(user_data) - - data = {"method": method, "path_query": path_query, "body": body} - - try: - result = json.loads(json_query(json.dumps(data, sort_keys=True))) - token_data = json.loads(result["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - if not "expiration" in token_data: - raise AuthError("Authentication error") - - self.token = token_data - self.update_auth_header() - # If we are here, means the method call was successful. - return True - - def update_auth_header(self): - self.auth_header = { - "Authorization": "token " + self.token["token"], - "Content-Type": "application/json", - "Accept": "application/json", - } - - def get_sources(self) -> List[Source]: - """ - Returns a list of all the sources from the Server. - - :returns: List of Source objects. - """ - path_query = "api/v1/sources" - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - sources = data["sources"] - result = [] # type: List[Source] - - for source in sources: - s = Source(**source) - result.append(s) - - return result - - def get_source(self, source: Source) -> Source: - """ - This will return a single Source based on UUID. - - :param source: Source object containing only source's uuid value. - :returns: Source object fetched from server for the given UUID value. - """ - path_query = "api/v1/sources/{}".format(source.uuid) - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - return Source(**data) - - def get_source_from_string(self, uuid: str) -> Source: - """ - This will fetch a source from server and return it. - - :param uuid: Source UUID as string. - :returns: Source object fetched from server for the given UUID value. - """ - - s = Source(uuid=uuid) - return self.get_source(s) - - def delete_source(self, source: Source) -> bool: - """ - This method will delete the source and collection. If the uuid - is not found in the server, it will raise WrongUUIDError. - - :param source: Source object containing only source's uuid value. - :returns: True if successful, raises Errors in case of wrong values. - """ - path_query = "api/v1/sources/{}".format(source.uuid) - method = "DELETE" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - if "message" in data and data["message"] == "Source and submissions deleted": - return True - - # We should never reach here - return False - - def delete_source_from_string(self, uuid: str) -> bool: - """ - This method will delete the source and collection. If the uuid - is not found in the server, it will raise WrongUUIDError. - - :param uuid: Source UUID as string. - :returns: True if the operation is successful. - """ - - s = Source(uuid=uuid) - return self.delete_source(s) - - def add_star(self, source: Source) -> bool: - """ - Adds a star to a given source. - - :param source: The source object to whom we want add a star. - :returns: True if successful, raises Error otherwise. - """ - path_query = "api/v1/sources/{}/add_star".format(source.uuid) - method = "POST" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "message" in data and data["message"] == "Star added": - return True - - return False - - def remove_star(self, source: Source) -> bool: - """Removes star from a given Source. - - :param source: Source object to remove the star from. - :returns: True if successful, raises Error otherwise. - """ - path_query = "api/v1/sources/{}/remove_star".format(source.uuid) - method = "delete" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "message" in data and data["message"] == "Star removed": - return True - - return False - - def get_submissions(self, source: Source) -> List[Submission]: - """ - Returns a list of Submission objects from the server for a given source. - - :param source: Source object for whom we want to find all the submissions. - :returns: List of Submission objects. - """ - path_query = "api/v1/sources/{}/submissions".format(source.uuid) - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - result = [] # type: List[Submission] - values = data["submissions"] - - for val in values: - s = Submission(**val) - result.append(s) - - return result - - def get_submission(self, submission: Submission) -> Submission: - """ - Returns the updated Submission object from the server. - - :param submission: Submission object we want to update. - :returns: Updated submission object from the server. - """ - source_uuid = submission.source_url.split("/")[-1] - path_query = "api/v1/sources/{}/submissions/{}".format( - source_uuid, submission.uuid - ) - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing submission {}".format(submission.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - return Submission(**data) - - def get_submission_from_string(self, uuid: str, source_uuid: str) -> Submission: - """ - Returns the updated Submission object from the server. - - :param uuid: UUID of the Submission object. - :param source_uuid: UUID of the source. - :returns: Updated submission object from the server. - """ - s = Submission(uuid=uuid) - s.source_uuid = source_uuid - s.source_url = "/api/v1/sources/{}".format(source_uuid) - return self.get_submission(s) - - def get_all_submissions(self) -> List[Submission]: - """ - Returns a list of Submission objects from the server. - - :returns: List of Submission objects. - """ - path_query = "api/v1/submissions" - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - result = [] # type: List[Submission] - values = data["submissions"] - - for val in values: - s = Submission(**val) - result.append(s) - - return result - - def delete_submission(self, submission: Submission) -> bool: - """ - Deletes a given Submission object from the server. - - :param submission: The Submission object we want to delete in the server. - :returns: True if successful, raises Error otherwise. - """ - # Not using direct URL because this helps to use the same method - # from local submission (not fetched from server) objects. - # See the *from_string for an example. - source_uuid = submission.source_url.split("/")[-1] - path_query = "api/v1/sources/{}/submissions/{}".format( - source_uuid, submission.uuid - ) - method = "DELETE" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing submission {}".format(submission.uuid)) - - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - if "message" in data and data["message"] == "Submission deleted": - return True - # We should never reach here - return False - - def delete_submission_from_string(self, uuid: str, source_uuid: str) -> bool: - """ - Deletes a given Submission based on uuids from the server. - - :param uuid: UUID of the Submission object. - :param source_uuid: UUID of the source. - :returns: Updated submission object from the server. - """ - s = Submission(uuid=uuid) - s.source_url = "/api/v1/sources/{}".format(source_uuid) - return self.delete_submission(s) - - def flag_source(self, source: Source) -> bool: - """ - Flags a source for reply. - - :param source: Source object we want to flag. - :returns: True if successful, raises Error otherwise. - """ - path_query = "api/v1/sources/{}/flag".format(source.uuid) - method = "POST" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - return True - - def get_current_user(self): - """ - Returns a dictionary of the current user data. - - Example: - - { - 'is_admin': True, - 'last_login': '2018-08-01T19:10:38.199429Z', - 'username': 'journalist' - } - """ - path_query = "api/v1/user" - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - return data - - def reply_source(self, source: Source, msg: str) -> bool: - """ - This method is used to reply to a given source. The message should be preencrypted with the source's - GPG public key. - - :param source: Source object we want to reply. - :param msg: Encrypted message with Source's GPG public key. - """ - path_query = "api/v1/sources/{}/replies".format(source.uuid) - method = "POST" - - reply = {"reply": msg} - body = json.dumps(reply) - - data = { - "method": method, - "path_query": path_query, - "headers": self.auth_header, - "body": body, - } - - try: - res = json.loads(json_query(json.dumps(data))) - data = json.loads(res["body"]) - - if res["status"] == 400: - raise ReplyError(data["message"]) - - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - if "message" in data and data["message"] == "Your reply has been stored": - return True - # We should never reach here - return False - - def get_replies_from_source(self, source: Source) -> List[Reply]: - """ - This will return a list of replies associated with a source. - - :param source: Source object containing only source's uuid value. - :returns: List of Reply objects. - """ - path_query = "api/v1/sources/{}/replies".format(source.uuid) - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - result = [] - for datum in data["replies"]: - reply = Reply(**datum) - result.append(reply) - - return result - - def get_reply_from_source(self, source: Source, reply_uuid: str) -> Reply: - """ - This will return a single specific reply. - - :param source: Source object. - :param reply_uuid: UUID of the reply. - :returns: A reply object - """ - path_query = "api/v1/sources/{}/replies/{}".format(source.uuid, reply_uuid) - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - reply = Reply(**data) - - return reply - - def get_all_replies(self) -> List[Reply]: - """ - This will return a list of all replies from the server. - - :returns: List of Reply objects. - """ - path_query = "api/v1/replies" - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - result = [] - for datum in data["replies"]: - reply = Reply(**datum) - result.append(reply) - - return result - - def delete_reply(self, reply: Reply) -> bool: - """ - Deletes a given Reply object from the server. - - :param reply: The Reply object we want to delete in the server. - :returns: True if successful, raises Error otherwise. - """ - # Not using direct URL because this helps to use the same method - # from local reply (not fetched from server) objects. - # See the *from_string for an example. - source_uuid = reply.source_url.split("/")[-1] - path_query = "api/v1/sources/{}/replies/{}".format(source_uuid, reply.uuid) - method = "DELETE" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing reply {}".format(reply.uuid)) - - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - if "message" in data and data["message"] == "Reply deleted": - return True - # We should never reach here - return False - - def download_submission(self, submission: Submission) -> Tuple[str, str]: - """ - Downloads the submission object from the server. - - :param submission: Submission object we want to update. - :returns: Tuple of sha256sum, temporary filename - """ - global proxyvmname - source_uuid = submission.source_url.split("/")[-1] - path_query = "/api/v1/sources/{}/submissions/{}/download".format( - source_uuid, submission.uuid - ) - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing submission {}".format(submission.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - etag = json.loads(res["headers"]["Etag"]) - - filename = os.path.join( - "/home/user/QubesIncoming/", proxyvmname, data["filename"] - ) - - return etag[7:], filename - - def download_reply(self, reply: Reply) -> Tuple[str, str]: - """ - Downloads the reply object from the server. - - :param reply: Reply object we want to update. - :returns: Tuple of sha256sum, temporary filename - """ - global proxyvmname - source_uuid = reply.source_url.split("/")[-1] - path_query = "/api/v1/sources/{}/replies/{}/download".format( - source_uuid, reply.uuid - ) - method = "GET" - - data = {"method": method, "path_query": path_query, "headers": self.auth_header} - - try: - res = json.loads(json_query(json.dumps(data))) - - if res["status"] == 404: - raise WrongUUIDError("Missing reply {}".format(reply.uuid)) - data = json.loads(res["body"]) - except json.decoder.JSONDecodeError: - raise BaseError("Error in parsing JSON") - - if "error" in data: - raise AuthError(data["error"]) - - etag = json.loads(res["headers"]["Etag"]) - - filename = os.path.join( - "/home/user/QubesIncoming/", proxyvmname, data["filename"] - ) - - return etag[7:], filename diff --git a/tests/test_apiproxy.py b/tests/test_apiproxy.py index 0cb6787b4..b1be972bc 100644 --- a/tests/test_apiproxy.py +++ b/tests/test_apiproxy.py @@ -19,7 +19,8 @@ def setUp(self): self.username = "journalist" self.password = "correct horse battery staple profanity oil chewy" self.server = "http://localhost:8081/" - self.api = APIProxy(self.server, self.username, self.password, str(self.totp.now())) + self.api = API(self.server, self.username, self.password, + str(self.totp.now()), proxy=True) for i in range(3): try: self.api.authenticate() @@ -41,7 +42,7 @@ def test_api_auth(self): def test_get_sources(self): sources = self.api.get_sources() self.assertEqual(len(sources), 2) - + @dastollervey_datasaver def test_star_add_remove(self): s = self.api.get_sources()[0] diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py index aa86a1b6c..93527120f 100644 --- a/tests/utils/__init__.py +++ b/tests/utils/__init__.py @@ -79,7 +79,7 @@ def wrapper(*args, **kwargs): RES = json.load(fobj) mock = MagicMock() mock.side_effect = internal_sideeffect - with patch("sdclientapi.proxyapi.json_query", mock): + with patch("sdclientapi.json_query", mock): result = func(*args, **kwargs) if not os.path.exists(filename): From 6138af0aabf590202c7e6b03d216968cdef8069e Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Mon, 15 Oct 2018 01:51:00 -0400 Subject: [PATCH 13/14] Merges API and APIProxy classes Also updates tests and test JSON data files. --- data/setUp.json | 2 +- data/test-get-wrong-submissions.yml | 2 +- data/test_delete_reply.json | 2 +- data/test_delete_source.json | 2 +- data/test_delete_source_from_string.json | 2 +- data/test_delete_submission.json | 2 +- data/test_delete_submission_from_string.json | 2 +- data/test_download_reply.json | 2 +- data/test_download_submission.json | 2 +- data/test_error_unencrypted_reply.json | 2 +- data/test_failed_single_source.json | 2 +- data/test_flag_source.json | 2 +- data/test_get_all_replies.json | 2 +- data/test_get_all_submissions.json | 2 +- data/test_get_current_user.json | 2 +- data/test_get_replies_from_source.json | 2 +- data/test_get_reply_from_source.json | 2 +- data/test_get_single_source.json | 2 +- data/test_get_single_source_from_string.json | 2 +- data/test_get_sources.json | 2 +- data/test_get_submission.json | 2 +- data/test_get_submission_from_string.json | 2 +- data/test_get_submissions.json | 2 +- data/test_get_wrong_submissions.json | 2 +- data/test_reply_source.json | 2 +- data/test_star_add_remove.json | 2 +- sdclientapi/__init__.py | 224 +++++++++++-------- tests/test_api.py | 2 +- 28 files changed, 158 insertions(+), 120 deletions(-) diff --git a/data/setUp.json b/data/setUp.json index fd57f23da..f8ec29e61 100644 --- a/data/setUp.json +++ b/data/setUp.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-15T18:50:30.596706Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTYyOTQzMCwiaWF0IjoxNTM5NjAwNjMwfQ.eyJpZCI6MX0.DxMon85hJuDUFMJdeWdICVQ7slqQHsIx2aNC2F88Ljk\\\"\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1MDozMCBHTVQifX0.DqYCdg.JSb0AxCyX5KKX8QeFaHOM32pJvM; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:50:30 GMT\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test-get-wrong-submissions.yml b/data/test-get-wrong-submissions.yml index 053e774da..f9f75b5e0 100644 --- a/data/test-get-wrong-submissions.yml +++ b/data/test-get-wrong-submissions.yml @@ -80,7 +80,7 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.19.1] method: GET - uri: http://localhost:8081/api/v1/sources/rofl-missing/submissions/2334 + uri: http://localhost:8081/api/v1/sources/rofl-missing/submissions response: body: {string: "{\n \"error\": \"Not Found\", \n \"message\": \"The requested\ \ URL was not found on the server. If you entered the URL manually please\ diff --git a/data/test_delete_reply.json b/data/test_delete_reply.json index 385505e93..681de883f 100644 --- a/data/test_delete_reply.json +++ b/data/test_delete_reply.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1NCBHTVQifX0.DqEaig.qonLMa3VAVf0Xe-GEOKl0E9urr8; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:31:54 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"1959\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-splay_epicure-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/c20e0f3d-2c7d-4d0f-af98-14424b9c312f\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe\\\", \\n \\\"uuid\\\": \\\"c20e0f3d-2c7d-4d0f-af98-14424b9c312f\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-splay_epicure-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/52561210-31a2-40db-bb8e-06d568fc618a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe\\\", \\n \\\"uuid\\\": \\\"52561210-31a2-40db-bb8e-06d568fc618a\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/c20e0f3d-2c7d-4d0f-af98-14424b9c312f\"}+2": "{\"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:31:55 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1NSBHTVQifX0.DqEaiw.AfjIgzuCP2yig3Cn9hD9pi8iWbQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"33\"}, \"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Reply deleted\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+3": "{\"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"4-splay_epicure-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe/replies/52561210-31a2-40db-bb8e-06d568fc618a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b231122e-9f80-441f-8ccb-88d6eb2d0efe\\\", \\n \\\"uuid\\\": \\\"52561210-31a2-40db-bb8e-06d568fc618a\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1NSBHTVQifX0.DqEaiw.AfjIgzuCP2yig3Cn9hD9pi8iWbQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:31:55 GMT\", \"Content-Length\": \"1477\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"73\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:39:04 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOTowNCBHTVQifX0.DqX_yA.EV_fWPcFtNbKcms0sYAzPKtvPyM; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"status\": 403, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-unmanly_salmonellosis-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b2d7bda5-0f50-4baf-ba3b-591cf65c6a3a/replies/e76b4ac1-01a3-497c-bc0f-8ea5bbd846f1\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b2d7bda5-0f50-4baf-ba3b-591cf65c6a3a\\\", \\n \\\"uuid\\\": \\\"e76b4ac1-01a3-497c-bc0f-8ea5bbd846f1\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-unmanly_salmonellosis-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b2d7bda5-0f50-4baf-ba3b-591cf65c6a3a/replies/98393589-7442-45b9-83b6-3cb45f3f7b2a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b2d7bda5-0f50-4baf-ba3b-591cf65c6a3a\\\", \\n \\\"uuid\\\": \\\"98393589-7442-45b9-83b6-3cb45f3f7b2a\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-bulimic_redress-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe/replies/71327942-53dd-4d03-917c-645e1f0c7ed7\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe\\\", \\n \\\"uuid\\\": \\\"71327942-53dd-4d03-917c-645e1f0c7ed7\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-bulimic_redress-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe/replies/e2ea71b4-7403-4592-a96f-679207f17b14\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe\\\", \\n \\\"uuid\\\": \\\"e2ea71b4-7403-4592-a96f-679207f17b14\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOTowNSBHTVQifX0.DqX_yQ.64wh2borsgv4MfYZnoBTbYNeQxY; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:39:05 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"1969\", \"Content-Type\": \"application/json\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/b2d7bda5-0f50-4baf-ba3b-591cf65c6a3a/replies/e76b4ac1-01a3-497c-bc0f-8ea5bbd846f1\"}+2": "{\"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Reply deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:39:06 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOTowNiBHTVQifX0.DqX_yg.0uR9ucOz50EqOTDgn6AuRBKKfNg; HttpOnly; Path=/\", \"Content-Length\": \"33\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+3": "{\"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"4-unmanly_salmonellosis-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b2d7bda5-0f50-4baf-ba3b-591cf65c6a3a/replies/98393589-7442-45b9-83b6-3cb45f3f7b2a\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b2d7bda5-0f50-4baf-ba3b-591cf65c6a3a\\\", \\n \\\"uuid\\\": \\\"98393589-7442-45b9-83b6-3cb45f3f7b2a\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-bulimic_redress-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe/replies/71327942-53dd-4d03-917c-645e1f0c7ed7\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe\\\", \\n \\\"uuid\\\": \\\"71327942-53dd-4d03-917c-645e1f0c7ed7\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-bulimic_redress-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe/replies/e2ea71b4-7403-4592-a96f-679207f17b14\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/103be2d8-7ab8-4188-94ef-4f98e9c398fe\\\", \\n \\\"uuid\\\": \\\"e2ea71b4-7403-4592-a96f-679207f17b14\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOTowNiBHTVQifX0.DqX_yw.BR8eGjBy2Nxz7Nn-EY88EpHfiGo; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:39:07 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"1479\"}, \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_delete_source.json b/data/test_delete_source.json index 954bdfbe2..e181cac97 100644 --- a/data/test_delete_source.json +++ b/data/test_delete_source.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"headers\": {\"Content-Length\": \"73\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:08 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOCBHTVQifX0.DqEamA.Rz19VDYyhFF2_UvVptjQBdct478; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/user\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"151\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T17:32:07.242517Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"5233\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"wingless howler\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZMBEACUDbVOFlpWWeOugPWX5dX1sBGaduX1P01XO27dgFUedd7Rqe51\\\\nNLelyIWFocRg+Ee+c0sskEr+zih3s4n+A4Vjyn2fZjapaoHYCbosv8A1C9AXtQip\\\\n6F5k099stXUsl2iP3q5Bq1r4osWXH6z6/5pWYpl8JdLEpbx2K1OmVr44PaCO3wTA\\\\nlzHTYJYtDV9ZvQzJbD76nxD+rsueUKTjTQ32ot51QG0mQmcX3d+PTOlbOodMsu9d\\\\nnOfTf7JeYg/7eLlP3ACVUHgEwNvNvcAVXMpIvHbcAYWM1iHsDolzzqe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BH+MwoNrQp10lmNhIFBKts3iVBkVerXeyHnvJcYpZ\\\\nclZagGth7pfw3RS1QFNZbTcNYnwAp0UBczKvkhwniB/BjIkaHQ3Gu8HYd3jqKEI5\\\\nV2BSPNe4mV5hKIGdelp6BA/yh1LRl6KUzHsDs5qDmgHSRychkBAEbgPsHkRqJjW5\\\\nNm0/CPUMmcX6dEMMY9OwEYVX5ZllfbzOUQlwxx2h6tG6snmewbl3USbGy/QR2Abv\\\\n3N4xRwhgFEhZChmje4KAmV7LQiZTjZg6QXO9LV4YXMr9gerAm/q4TuFk7Z5p5phH\\\\n4egWb6umT6Tj/Mud2vrYSIPu0byroQxSZbU0hYeRGAg=\\\\n=lewJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:12.587473Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\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Cky/UmRNacDDVvW5qEP/hIQdvmPZJuPgCV\\\\n+z4D+zsDWCT5h4lXeFiS9pUIzIylqafsuG4QjXQCYEsI5C+lu6Tg1eiGCr/G7KMD\\\\nr5909C+O3NYDErFw/PRrcVeaHQmDzaV9iexNNRdPhdtnnSs9QmwumGXvF4ey5wx5\\\\nIxCtyqm/+Ymd/VK6BKSOgzeJG8/EnUOxii/RiTrQgZAAo6DSHAgra6sH+ve+VM1g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\"}, \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+3": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZYBEACmzFDMSMUCEy7+LjnrVdXxCVRjtayb+ok/cCUD1zzAEOvatWaO\\\\nG9lBOFWBsQD5Brj893ONOWjxeckhZ33TUa5WA2jC4FC2Hmx4q1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DErFw/PRrcVeaHQmDzaV9iexNNRdPhdtnnSs9QmwumGXvF4ey5wx5\\\\nIxCtyqm/+Ymd/VK6BKSOgzeJG8/EnUOxii/RiTrQgZAAo6DSHAgra6sH+ve+VM1g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:49 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OSBHTVQifX0.DqEcKQ.nIi7q2oAq4z9LwOpa3Q4Z7UT8C8; HttpOnly; Path=/\", \"Content-Length\": \"2627\"}}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"receptive herald\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEcNgBEACwzyiYcLvntPZ7fWONQBwD8IeuunhTXTsyAX0kPUVTD6tqP0cU\\\\nF2xcYACVOjglSL+dnLkAUI8aszEdI8oX74OYfLrzGnmACr7wQfwZ3Y7m3U95DsNU\\\\nOMMAjot5Y4OA9cvf7RWDYLTfT7Me5mMwadmfNmXXgLf3QDnUGldZCe15U3Q7K1pG\\\\nS7V+a2VS9leGl3vRrQosyjpaVmtQOBWEb3/Xij8ntXUQIFT4wBATth2nGQ5fYHoe\\\\nxoe5dQBpUZwsXNnGZ+emQM8EJE/Xxm0T7ZZngHsU9DsES5SUMmkPaAdivWTvPvEt\\\\nOSThzdO6qnvBwNHTCmlOkkm7NFxBt8kxiOjB+21wtVnz6noVqvht1Ca1p7W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rh3wpfMWeDbiHzLyiKEqE6\\\\nR6uOMmcvQKJ+01X5iB0JBfo0lc5mQGUJE1PVPi/nSdM0m1pXe/F+dO+E/cT3Q4Ky\\\\niXhCPzc/ZwXFEnMrDihs45fcNBosvr3wpyGPNIMSj62JZVp9bVTKsTumKQVe8A/Y\\\\n0KxacDSsxNXq9bcDZgGHoxJ2hYYdHN7iQXTHWYBkTqDqvRAAz1WKOsh1nN3i9/6Y\\\\nNB8vfRFCHXiVxtYMez9oMYK0bpe9J4QvbomxDc2nFMg=\\\\n=d4Np\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:50:04.759461Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba\\\", \\n \\\"uuid\\\": \\\"ec973f69-7afc-43fa-b810-dd3090fd1fba\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"raising electroplate\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEcN8BEAC3pD6oGMqSN/YNvKxtxen4TYd7itO/dyN8qTGAeK/mSD7089ux\\\\nwf7mWrBPHcxbMOUj5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5Vf3y5lfV/ckcIp25aaQq\\\\nMQt5cySNyQs8Pfos9sHUwCIgGathOmvohdyaPjhN9/dTFUekQPK4wTxbtv0+mOjS\\\\n6NVWOpNdekTiLjTX6vz/pHGp2c/8sKm10XP65OA9gn/HlrtpXdPOCwAc9nr1QFxW\\\\naQnO07jPW/DORrWJACHwKl+VUlPROY6l1L5xF7n+wCynwJYgvbx3+CmDizpFsMc1\\\\nWoMKcxQsgKFMPYeoDA47cOiCGySYXRsDnN/CLLho9f/VCRA6m3uo3wUW2ZdjJUdW\\\\nx6ySidtHd9I/mV7wapIZM3g5x53vHGqFjPcqRH1Ms8fhDuK4x9suz5otKBuqxvtm\\\\nbgIT7EXMjb3evZFwLwi9rEb09an00pOV7qCha21G+TCdA9/kDtfTBYIvwaTcx1WZ\\\\nO71hayr6Qijn3pdy8j9MDT21MJGaT8oRDRq/Z2rU4ZeAYRJUP0BWJYT/WyrPiba6\\\\nnUSPOg9SX62II3K22D3vy/ftgPbUbC9n6QsYC2Dcij6AoFqVZRxM/beltg02vS4U\\\\nE3sQDNAupjiBXn34pZzjec1/PyQuIhk07UejJhgg6tQ=\\\\n=t9WV\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:50:08.360591Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b\\\", \\n \\\"uuid\\\": \\\"b4071b88-a05b-452f-9c6e-2aa1191c085b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1MzowMyBHTVQifX0.DqYDDw.RitzC--vVUjS-a5gMBXQ1EHFFVA; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:53:03 GMT\", \"Content-Length\": \"5239\"}, \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba\"}+2": "{\"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:53:04 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1MzowNCBHTVQifX0.DqYDEA.d60t9CZ1CIcD0bo5HHxI_l-awyQ; HttpOnly; Path=/\", \"Content-Length\": \"50\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+3": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"raising electroplate\\\",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CCQoLBBYCAwECHgECF4AACgkQgxInu0B2qA+pYQ/+\\\\nJuLjhArDN0ndA+viedkDr2TxzalrOWQhIdHD4AK1RQGaYZeBu6/gHGnPUpD20ja4\\\\n6mdA6shp2VW6RIXFTignClpDkfgcDfYmFGAoqbTbNwy5Vf3y5lfV/ckcIp25aaQq\\\\nMQt5cySNyQs8Pfos9sHUwCIgGathOmvohdyaPjhN9/dTFUekQPK4wTxbtv0+mOjS\\\\n6NVWOpNdekTiLjTX6vz/pHGp2c/8sKm10XP65OA9gn/HlrtpXdPOCwAc9nr1QFxW\\\\naQnO07jPW/DORrWJACHwKl+VUlPROY6l1L5xF7n+wCynwJYgvbx3+CmDizpFsMc1\\\\nWoMKcxQsgKFMPYeoDA47cOiCGySYXRsDnN/CLLho9f/VCRA6m3uo3wUW2ZdjJUdW\\\\nx6ySidtHd9I/mV7wapIZM3g5x53vHGqFjPcqRH1Ms8fhDuK4x9suz5otKBuqxvtm\\\\nbgIT7EXMjb3evZFwLwi9rEb09an00pOV7qCha21G+TCdA9/kDtfTBYIvwaTcx1WZ\\\\nO71hayr6Qijn3pdy8j9MDT21MJGaT8oRDRq/Z2rU4ZeAYRJUP0BWJYT/WyrPiba6\\\\nnUSPOg9SX62II3K22D3vy/ftgPbUbC9n6QsYC2Dcij6AoFqVZRxM/beltg02vS4U\\\\nE3sQDNAupjiBXn34pZzjec1/PyQuIhk07UejJhgg6tQ=\\\\n=t9WV\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:50:08.360591Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b\\\", \\n \\\"uuid\\\": \\\"b4071b88-a05b-452f-9c6e-2aa1191c085b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:53:04 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1MzowNCBHTVQifX0.DqYDEA.d60t9CZ1CIcD0bo5HHxI_l-awyQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"2632\"}}"} \ No newline at end of file diff --git a/data/test_delete_source_from_string.json b/data/test_delete_source_from_string.json index 954bdfbe2..e181cac97 100644 --- a/data/test_delete_source_from_string.json +++ b/data/test_delete_source_from_string.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"headers\": {\"Content-Length\": \"73\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:08 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOCBHTVQifX0.DqEamA.Rz19VDYyhFF2_UvVptjQBdct478; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/user\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"151\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T17:32:07.242517Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"5233\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"wingless howler\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZMBEACUDbVOFlpWWeOugPWX5dX1sBGaduX1P01XO27dgFUedd7Rqe51\\\\nNLelyIWFocRg+Ee+c0sskEr+zih3s4n+A4Vjyn2fZjapaoHYCbosv8A1C9AXtQip\\\\n6F5k099stXUsl2iP3q5Bq1r4osWXH6z6/5pWYpl8JdLEpbx2K1OmVr44PaCO3wTA\\\\nlzHTYJYtDV9ZvQzJbD76nxD+rsueUKTjTQ32ot51QG0mQmcX3d+PTOlbOodMsu9d\\\\nnOfTf7JeYg/7eLlP3ACVUHgEwNvNvcAVXMpIvHbcAYWM1iHsDolzzqe/phs6omT3\\\\n4hBzySrxj+6eJ3TOss/uby7dPMwdrWvbRlpJv0uiuw6SaGGu0ZisnHp9j+u4fF7m\\\\nGYLf7l2GiTjwazlVfG93XfFimmr+MhRnVczY2abjezYJ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4mV5hKIGdelp6BA/yh1LRl6KUzHsDs5qDmgHSRychkBAEbgPsHkRqJjW5\\\\nNm0/CPUMmcX6dEMMY9OwEYVX5ZllfbzOUQlwxx2h6tG6snmewbl3USbGy/QR2Abv\\\\n3N4xRwhgFEhZChmje4KAmV7LQiZTjZg6QXO9LV4YXMr9gerAm/q4TuFk7Z5p5phH\\\\n4egWb6umT6Tj/Mud2vrYSIPu0byroQxSZbU0hYeRGAg=\\\\n=lewJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:12.587473Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZYBEACmzFDMSMUCEy7+LjnrVdXxCVRjtayb+ok/cCUD1zzAEOvatWaO\\\\nG9lBOFWBsQD5Brj893ONOWjxeckhZ33TUa5WA2jC4FC2Hmx4q1lApx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w/PRrcVeaHQmDzaV9iexNNRdPhdtnnSs9QmwumGXvF4ey5wx5\\\\nIxCtyqm/+Ymd/VK6BKSOgzeJG8/EnUOxii/RiTrQgZAAo6DSHAgra6sH+ve+VM1g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"50\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:38:48 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OCBHTVQifX0.DqEcKA.7ZNRecCokzhqulsxpkFhUvEAPxQ; HttpOnly; Path=/\"}, \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+3": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZYBEACmzFDMSMUCEy7+LjnrVdXxCVRjtayb+ok/cCUD1zzAEOvatWaO\\\\nG9lBOFWBsQD5Brj893ONOWjxeckhZ33TUa5WA2jC4FC2Hmx4q1lApxYqkDS0mEy4\\\\nyclZDHpWADCFsF2z8oIOTB/v/v1OqyFHmshoJvXN0jpXehBiRIWL7SzB2Hnj/rMD\\\\n+ax4+WZ27TxgBJ5SJrbgoMGHMayOMEcsd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g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:38:49 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozODo0OSBHTVQifX0.DqEcKQ.nIi7q2oAq4z9LwOpa3Q4Z7UT8C8; HttpOnly; Path=/\", \"Content-Length\": \"2627\"}}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"receptive herald\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEcNgBEACwzyiYcLvntPZ7fWONQBwD8IeuunhTXTsyAX0kPUVTD6tqP0cU\\\\nF2xcYACVOjglSL+dnLkAUI8aszEdI8oX74OYfLrzGnmACr7wQfwZ3Y7m3U95DsNU\\\\nOMMAjot5Y4OA9cvf7RWDYLTfT7Me5mMwadmfNmXXgLf3QDnUGldZCe15U3Q7K1pG\\\\nS7V+a2VS9leGl3vRrQosyjpaVmtQOBWEb3/Xij8ntXUQIFT4wBATth2nGQ5fYHoe\\\\nxoe5dQBpUZwsXNnGZ+emQM8EJE/Xxm0T7ZZngHsU9DsES5SUMmkPaAdivWTvPvEt\\\\nOSThzdO6qnvBwNHTCmlOkkm7NFxBt8kxiOjB+21wtVnz6noVqvht1Ca1p7W+2A4M\\\\nfo2QvTHwYeG09204lrJljUF9MasvVeuViuxIdtHkPnC7smr25nPMucGqKwS/R2qr\\\\nF0kBE+BXioPfl8BSO7PVU4MapGaGZxbGTU0w0b5HUC2oHQlv3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45fcNBosvr3wpyGPNIMSj62JZVp9bVTKsTumKQVe8A/Y\\\\n0KxacDSsxNXq9bcDZgGHoxJ2hYYdHN7iQXTHWYBkTqDqvRAAz1WKOsh1nN3i9/6Y\\\\nNB8vfRFCHXiVxtYMez9oMYK0bpe9J4QvbomxDc2nFMg=\\\\n=d4Np\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:50:04.759461Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba\\\", \\n \\\"uuid\\\": \\\"ec973f69-7afc-43fa-b810-dd3090fd1fba\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"raising electroplate\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEcN8BEAC3pD6oGMqSN/YNvKxtxen4TYd7itO/dyN8qTGAeK/mSD7089ux\\\\nwf7mWrBPHcxbMOUj5mCfJIf1g9OGfb/Wl6W3Ndn+xAD7dXwFjWlW0dAs/VYZ9fvJ\\\\n2oDO8pJISebYFLB9GiZkiFxjrZvJwfbMVWKfZ988XdDw1N8wEd4UjUKWLh+y4b+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sKm10XP65OA9gn/HlrtpXdPOCwAc9nr1QFxW\\\\naQnO07jPW/DORrWJACHwKl+VUlPROY6l1L5xF7n+wCynwJYgvbx3+CmDizpFsMc1\\\\nWoMKcxQsgKFMPYeoDA47cOiCGySYXRsDnN/CLLho9f/VCRA6m3uo3wUW2ZdjJUdW\\\\nx6ySidtHd9I/mV7wapIZM3g5x53vHGqFjPcqRH1Ms8fhDuK4x9suz5otKBuqxvtm\\\\nbgIT7EXMjb3evZFwLwi9rEb09an00pOV7qCha21G+TCdA9/kDtfTBYIvwaTcx1WZ\\\\nO71hayr6Qijn3pdy8j9MDT21MJGaT8oRDRq/Z2rU4ZeAYRJUP0BWJYT/WyrPiba6\\\\nnUSPOg9SX62II3K22D3vy/ftgPbUbC9n6QsYC2Dcij6AoFqVZRxM/beltg02vS4U\\\\nE3sQDNAupjiBXn34pZzjec1/PyQuIhk07UejJhgg6tQ=\\\\n=t9WV\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:50:08.360591Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b\\\", \\n \\\"uuid\\\": \\\"b4071b88-a05b-452f-9c6e-2aa1191c085b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1MzowMyBHTVQifX0.DqYDDw.RitzC--vVUjS-a5gMBXQ1EHFFVA; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:53:03 GMT\", \"Content-Length\": \"5239\"}, \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/ec973f69-7afc-43fa-b810-dd3090fd1fba\"}+2": "{\"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:53:04 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1MzowNCBHTVQifX0.DqYDEA.d60t9CZ1CIcD0bo5HHxI_l-awyQ; HttpOnly; Path=/\", \"Content-Length\": \"50\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"message\\\": \\\"Source and submissions deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+3": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"raising electroplate\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEcN8BEAC3pD6oGMqSN/YNvKxtxen4TYd7itO/dyN8qTGAeK/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6RIXFTignClpDkfgcDfYmFGAoqbTbNwy5Vf3y5lfV/ckcIp25aaQq\\\\nMQt5cySNyQs8Pfos9sHUwCIgGathOmvohdyaPjhN9/dTFUekQPK4wTxbtv0+mOjS\\\\n6NVWOpNdekTiLjTX6vz/pHGp2c/8sKm10XP65OA9gn/HlrtpXdPOCwAc9nr1QFxW\\\\naQnO07jPW/DORrWJACHwKl+VUlPROY6l1L5xF7n+wCynwJYgvbx3+CmDizpFsMc1\\\\nWoMKcxQsgKFMPYeoDA47cOiCGySYXRsDnN/CLLho9f/VCRA6m3uo3wUW2ZdjJUdW\\\\nx6ySidtHd9I/mV7wapIZM3g5x53vHGqFjPcqRH1Ms8fhDuK4x9suz5otKBuqxvtm\\\\nbgIT7EXMjb3evZFwLwi9rEb09an00pOV7qCha21G+TCdA9/kDtfTBYIvwaTcx1WZ\\\\nO71hayr6Qijn3pdy8j9MDT21MJGaT8oRDRq/Z2rU4ZeAYRJUP0BWJYT/WyrPiba6\\\\nnUSPOg9SX62II3K22D3vy/ftgPbUbC9n6QsYC2Dcij6AoFqVZRxM/beltg02vS4U\\\\nE3sQDNAupjiBXn34pZzjec1/PyQuIhk07UejJhgg6tQ=\\\\n=t9WV\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:50:08.360591Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b4071b88-a05b-452f-9c6e-2aa1191c085b\\\", \\n \\\"uuid\\\": \\\"b4071b88-a05b-452f-9c6e-2aa1191c085b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:53:04 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1MzowNCBHTVQifX0.DqYDEA.d60t9CZ1CIcD0bo5HHxI_l-awyQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"2632\"}}"} \ No newline at end of file diff --git a/data/test_delete_submission.json b/data/test_delete_submission.json index b5badc77a..c30f0f7c6 100644 --- a/data/test_delete_submission.json +++ b/data/test_delete_submission.json @@ -1 +1 @@ -{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:40:47 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2039\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MDo0NyBHTVQifX0.DqEcnw.XVsouWt65Dt6-pT1geMJPVO8ut0; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/3f215dce-2e8d-4d15-b2a3-149c293171ae/download\\\", \\n \\\"filename\\\": \\\"1-beery_bribe-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/3f215dce-2e8d-4d15-b2a3-149c293171ae\\\", \\n \\\"uuid\\\": \\\"3f215dce-2e8d-4d15-b2a3-149c293171ae\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9/download\\\", \\n \\\"filename\\\": \\\"2-beery_bribe-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\", \\n \\\"uuid\\\": \\\"c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765/download\\\", \\n \\\"filename\\\": \\\"1-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765\\\", \\n \\\"uuid\\\": \\\"d5565739-7755-4abe-a968-571cc877e765\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de/download\\\", \\n \\\"filename\\\": \\\"2-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de\\\", \\n \\\"uuid\\\": \\\"65da24da-44f1-481c-bf34-b9e5be64b5de\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/3f215dce-2e8d-4d15-b2a3-149c293171ae\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:40:48 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"38\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MDo0OCBHTVQifX0.DqEcoA.GtKM2649QA5lynN5TR6pQ2IVFlY; HttpOnly; Path=/\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+3": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9/download\\\", \\n \\\"filename\\\": \\\"2-beery_bribe-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/44855da5-f8aa-48f5-b5b9-56ebe3478325/submissions/c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\", \\n \\\"uuid\\\": \\\"c8fa54ac-cd2d-435b-967b-d4e1149eede9\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765/download\\\", \\n \\\"filename\\\": \\\"1-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/d5565739-7755-4abe-a968-571cc877e765\\\", \\n \\\"uuid\\\": \\\"d5565739-7755-4abe-a968-571cc877e765\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de/download\\\", \\n \\\"filename\\\": \\\"2-gubernatorial_keep-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a7de9354-5105-41e3-9606-94a8e8a9e3a1/submissions/65da24da-44f1-481c-bf34-b9e5be64b5de\\\", \\n \\\"uuid\\\": \\\"65da24da-44f1-481c-bf34-b9e5be64b5de\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MDo0OSBHTVQifX0.DqEcoQ.fzIdZn2XEYYizcc70xZa1WDZTfo; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:40:49 GMT\", \"Content-Length\": \"1539\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1NToyNSBHTVQifX0.DqYDnQ.rrygdqGK86afft7ACBBMPuW7id8; HttpOnly; Path=/\", \"Content-Length\": \"2049\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Mon, 15 Oct 2018 10:55:25 GMT\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55/submissions/bccb8dee-5a2f-4e6e-b640-a66fc47bff17/download\\\", \\n \\\"filename\\\": \\\"1-palatable_flue-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55/submissions/bccb8dee-5a2f-4e6e-b640-a66fc47bff17\\\", \\n \\\"uuid\\\": \\\"bccb8dee-5a2f-4e6e-b640-a66fc47bff17\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55/submissions/4ef58591-2dda-4f6a-ac3a-415347d5ab46/download\\\", \\n \\\"filename\\\": \\\"2-palatable_flue-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55/submissions/4ef58591-2dda-4f6a-ac3a-415347d5ab46\\\", \\n \\\"uuid\\\": \\\"4ef58591-2dda-4f6a-ac3a-415347d5ab46\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/e6bac35e-4042-4a13-89d7-4412ec3150c1/download\\\", \\n \\\"filename\\\": \\\"1-penny-wise_telepathy-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/e6bac35e-4042-4a13-89d7-4412ec3150c1\\\", \\n \\\"uuid\\\": \\\"e6bac35e-4042-4a13-89d7-4412ec3150c1\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/c7f7548c-6b0c-4ab0-b52d-00467f456a4a/download\\\", \\n \\\"filename\\\": \\\"2-penny-wise_telepathy-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/c7f7548c-6b0c-4ab0-b52d-00467f456a4a\\\", \\n \\\"uuid\\\": \\\"c7f7548c-6b0c-4ab0-b52d-00467f456a4a\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55/submissions/bccb8dee-5a2f-4e6e-b640-a66fc47bff17\"}+2": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1NToyNiBHTVQifX0.DqYDng.7XCpAhg6n3srTEg_3511rP-26o8; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"38\", \"Date\": \"Mon, 15 Oct 2018 10:55:26 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+3": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55/submissions/4ef58591-2dda-4f6a-ac3a-415347d5ab46/download\\\", \\n \\\"filename\\\": \\\"2-palatable_flue-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/c3ddd7a5-6763-4ab8-978f-4329f9db2e55/submissions/4ef58591-2dda-4f6a-ac3a-415347d5ab46\\\", \\n \\\"uuid\\\": \\\"4ef58591-2dda-4f6a-ac3a-415347d5ab46\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/e6bac35e-4042-4a13-89d7-4412ec3150c1/download\\\", \\n \\\"filename\\\": \\\"1-penny-wise_telepathy-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/e6bac35e-4042-4a13-89d7-4412ec3150c1\\\", \\n \\\"uuid\\\": \\\"e6bac35e-4042-4a13-89d7-4412ec3150c1\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/c7f7548c-6b0c-4ab0-b52d-00467f456a4a/download\\\", \\n \\\"filename\\\": \\\"2-penny-wise_telepathy-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/0f9faa3a-4fd7-4798-9a70-ebd5760d5670/submissions/c7f7548c-6b0c-4ab0-b52d-00467f456a4a\\\", \\n \\\"uuid\\\": \\\"c7f7548c-6b0c-4ab0-b52d-00467f456a4a\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1NToyNyBHTVQifX0.DqYDnw.lYtUHx_O_y-K-HRQsKjQMJDiylI; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"1546\", \"Content-Type\": \"application/json\", \"Date\": \"Mon, 15 Oct 2018 10:55:27 GMT\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_delete_submission_from_string.json b/data/test_delete_submission_from_string.json index 9577ea164..327204918 100644 --- a/data/test_delete_submission_from_string.json +++ b/data/test_delete_submission_from_string.json @@ -1 +1 @@ -{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"standard torus\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/izEBEAC1WVjVDKVdsGsQaFhB94jl3Xho076A/pCt1C1SXqbPuw+N9uUI\\\\nL5fqkTnJ8dD5WPDOWxqR9nWlKzA35dmrXtCGRE6fsyK3Fud5xJYXe9V4H7tqrlDC\\\\n7QjAMAHeo66fmbbYIlEwQKablUrKKWOZ7Hb4ZxLOZulwvET3SsdNYvb/UD6SONaC\\\\nirxAwk8rc5n8Cps1WC1+zLy2X60fuGKI6f+VHv278djHpuWu4/Hd4v/FzbCr4r1u\\\\nwUI4z9f6dW2ZScQCGPvnPM7IbHu1AtXkwEPhfT9HZ+Vznodig/XFXX9laQso7766\\\\nUK44dCrpsqNRutxAEnpfeP0KF3Mf77OB175H7nWGYNFjeVlw57paeYNQkHdHtsAY\\\\nW+oqHCYQRLVCD+bWvMAGNzbyZXLB+2KZBxWzQ28DxwKmXWYJq96A1FvBraEzkgjI\\\\nHxEteBxG04Pm5Eklx8ti3dBhzNeZwha6BRMBvlqL3v6o/LH8c1lZKNHWQBpNqoYd\\\\nMyNCulljiOFycuSCm36q+wiMKLKtBCoIZxRIC+icdOvc9DdDF20pMOr4EhwgrB7l\\\\nYeG0ryKWdWqmbqw7Vmc71PCuu17YQn/h9xWbIs9LxFY8IUG/u+kxPFYHthhygqpv\\\\n1mGhhaLRixu1C+czjVt4QfDeAyQAzUgRMSC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n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:41:06.862851Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"uuid\\\": \\\"41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"offshore wiper\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/izQBEACmldggKSyKyGmX2IbpcKcHquHrkYygrf4C3sqX6+BOn8nbXduy\\\\nY2ppIW1fmd6UoDla3Io8x5WWAagvlFf8FYTG0iPiai1E6Hn8Lzo0ff2c+fOfsOYd\\\\nctlgqTlCEmn9HqYp/W1NGvCTzFainlk6XRKq45yA87wde86Qhb1kto4QBBKerfNE\\\\nxlZVmSP/XZf7FhEvQaXNFLJtWLyMhvZpyKuf9Eygy04QgqKIJaL9MLM8bhXPl294\\\\nThUJLobry4chJnzBasyOxKOdPYsIyeAq7y6wHFt6v+1+EZUUS7xhrJ79G8GO10n/\\\\n+CZrpCwcllvE6Hr0qbRahLGIh3XC90dmXMjsEislDSLzY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vVIyF49SaXZUsVnPPCYRjLUWhXXXOu6dDwzgIITdpxywtHdkih5wQTaWK1MUB87\\\\nOFDBKYzUkmARxv/XdiLxOm8yrqfp86ECiD+oMNhNOuDJPLiv6t2pi68bUtHNzS/T\\\\nmNqzkslqihDbEeg7/I45K/aoK1HQtXE/HNgpMygqap9HYPTzV7EoJhJPXfzBxp/3\\\\nC6VSGMPY6YQUvIrK+EIITWoF3HqSpnO84E8H7A4apk7K9wm4ujsh5jFHd4k2YhSF\\\\nPB2jgE83LH896Uyebzzc88CKQdj82rvV/td15+dVcyM=\\\\n=d7YK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:41:11.808980Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561\\\", \\n \\\"uuid\\\": \\\"a5b94646-bcf6-43a4-ade2-01f528d5f561\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Length\": \"5231\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1NyBHTVQifX0.DqEc5Q.HZD3owqQXAt6Y0XxVPwNtvTJcJ4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:41:57 GMT\"}, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions\"}+2": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:41:58 GMT\", \"Content-Length\": \"1031\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1OCBHTVQifX0.DqEc5g.LBMc4wzzJUT19RBUvVwFRgj9JDw; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7/download\\\", \\n \\\"filename\\\": \\\"1-standard_torus-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7\\\", \\n \\\"uuid\\\": \\\"e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78/download\\\", \\n \\\"filename\\\": \\\"2-standard_torus-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78\\\", \\n \\\"uuid\\\": \\\"dafc9e75-be08-4436-8aae-0f96c09c3f78\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/e6efc5f6-16f7-4aa1-aeda-63c0b5ca85c7\"}+3": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:41:59 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1OSBHTVQifX0.DqEc5w.7_llCSkVAICUbGN75aMdldsxfBs; HttpOnly; Path=/\", \"Content-Length\": \"38\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+4": "{\"version\": \"0.1.1\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTo0MTo1OSBHTVQifX0.DqEc5w.7_llCSkVAICUbGN75aMdldsxfBs; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"1534\", \"Date\": \"Thu, 11 Oct 2018 17:41:59 GMT\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78/download\\\", \\n \\\"filename\\\": \\\"2-standard_torus-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/41cf1954-31f0-43c4-889b-d9bb20f4ac0e/submissions/dafc9e75-be08-4436-8aae-0f96c09c3f78\\\", \\n \\\"uuid\\\": \\\"dafc9e75-be08-4436-8aae-0f96c09c3f78\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/730cd7c6-a7ea-40ae-bf2d-7345ba3ed24f/download\\\", \\n \\\"filename\\\": \\\"1-offshore_wiper-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/730cd7c6-a7ea-40ae-bf2d-7345ba3ed24f\\\", \\n \\\"uuid\\\": \\\"730cd7c6-a7ea-40ae-bf2d-7345ba3ed24f\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/ae93844d-397d-4140-ba80-f76489db71b5/download\\\", \\n \\\"filename\\\": \\\"2-offshore_wiper-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a5b94646-bcf6-43a4-ade2-01f528d5f561/submissions/ae93844d-397d-4140-ba80-f76489db71b5\\\", \\n \\\"uuid\\\": \\\"ae93844d-397d-4140-ba80-f76489db71b5\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"shortish theodicy\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEck8BEACiZLEiPmPtpsi2ayPjHs2Yc3/wIMiwK8P8uq89NtnnpW+nTshj\\\\nzhgRtKLy72hVmXovlv+RLckUgCWoeOcKU+HZOHVHDnbs4Orvh8tWP3kObHrKWy0A\\\\nPu/4lKY9IafAgBRWjBdouhqMtbmD+LS68WmRNxbaMxa3noK5dNy45TRgGEaQyh0v\\\\nqt4z7BU4efZWJhNK6Bjhpla9pfbKxUfAbz0eAq3ME2aeOiAqnSEYjwzcK4NkVC2r\\\\nPdMK/C36UWeZDsmAqC0uLsrHAebP8uYhA+ITKAqjTZcsKT9FhjKfUlmKMIQfCNVO\\\\nzk9pA6WxhMudyaPwdZX/jtAfnAXO4h5ryfDyxkMJXo0dog8E+RK2GjmI9wd46/Z7\\\\ndveCOFHQdmMHmJPzMAzcTNzfZ7Xft/ikO6rkiuhMyPP92yA2wNwf8DZnrT8Q880T\\\\neWfgzUUdoWRS1pVDYTBIrB6XlpsJesTwy8xt9ZesICmEZ+vNWvQWbVHcv24T+kxj\\\\nyckcgI8f0WcZ+vBl++Bzz3zaihtcylbHRai0W0vcYQgTQyhgfdGOO5bM3ZNvDwQ8\\\\nQXWwIVY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4FWhC9qSL7m2GsNzfeQNfUn+GFhCc\\\\nm9u2HGDD6XQAEkLGlaMS4APme26ntuGKdBJaMoLG3Gk=\\\\n=hRQT\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:56:19.305183Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4\\\", \\n \\\"uuid\\\": \\\"8bf7dc9e-f93a-4f30-9171-0733b886e2f4\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"floored schnapps\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEclUBEAC+yFNCYrJ9O4ictZ2BCmqF4uNjVFVv+QpYc+1rqONdv9mH5XLt\\\\nMcxTwaUfNZopZ3+0iYBfm7P86dwJzPdDBE4hQ5taUZiPWf4dJaV8lUz/UcnEGT9O\\\\n+oLO/Ak7vRsZsRur40mmLaM2Gmz+dzUz0G8NLiVFTKJdY5lK9OZ18HELNbryeVaQ\\\\nXLIdmom2+OMK6nAgTj2ekBIFAXLV4jzSIK23L9bM+ZqJljonGnrKuILH9vhbrQpT\\\\nBx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yTtV87zwerd+Xxx3D1QayVTnPPjtql1vJ/\\\\n3myaYVa4GU/BdQUQl/TWbnQS00P6NUsvPbsbjXRAUI7y6aW4s33Tx0lVY1uu5Lc8\\\\nzGii0wSUWWrFNf04QHIZlGyQk8FmIQeulcQn8h/l6YWE97SM/aMsnnsTD7HRJGnz\\\\n0x60mxFV1FmMFSMn3CuNd9AhGDtuC8MXCNglyMW+sGDG2Zma0D3F4/i8ESfs0kVA\\\\nRakUlJIsbkFmih0Ibb7VsnD65/PbKUjEp855Z/U579mS9378sX3kbD6jMubqq1XC\\\\nApDf46LJIO94FkKsZkDKTkgOXfsX4R+J6+MBzRIr63bZp1aa3n2NuchqwZyxxclu\\\\nD3opUPcNPNiNQM7KrnYH6FYR0163CadXOSuk20d2Nas=\\\\n=A3nz\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:56:24.989780Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416\\\", \\n \\\"uuid\\\": \\\"a961f0ed-d0e5-4f25-badc-4cf220a71416\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"5236\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1NzoxMiBHTVQifX0.DqYECA.wm4pyK7Cu38V518Gm1wpIHubwM8; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:57:12 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions\"}+2": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions/2a5fcb1d-6512-4408-a572-21062f2df334/download\\\", \\n \\\"filename\\\": \\\"1-shortish_theodicy-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions/2a5fcb1d-6512-4408-a572-21062f2df334\\\", \\n \\\"uuid\\\": \\\"2a5fcb1d-6512-4408-a572-21062f2df334\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions/5b149c74-8b6f-43b1-a142-2f740019d585/download\\\", \\n \\\"filename\\\": \\\"2-shortish_theodicy-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions/5b149c74-8b6f-43b1-a142-2f740019d585\\\", \\n \\\"uuid\\\": \\\"5b149c74-8b6f-43b1-a142-2f740019d585\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Mon, 15 Oct 2018 10:57:13 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1NzoxMyBHTVQifX0.DqYECQ.4zSc7PL_zv50jK8c1sNOkUxcK2c; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"1037\", \"Vary\": \"Cookie\"}, \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions/2a5fcb1d-6512-4408-a572-21062f2df334\"}+3": "{\"body\": \"{\\n \\\"message\\\": \\\"Submission deleted\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1NzoxMyBHTVQifX0.DqYECQ.4zSc7PL_zv50jK8c1sNOkUxcK2c; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:57:13 GMT\", \"Content-Length\": \"38\", \"Content-Type\": \"application/json\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+4": "{\"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"1541\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo1NzoxNCBHTVQifX0.DqYECg.CK6x9P4C1Wb07zm7MGTTg6qb5ew; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:57:14 GMT\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions/5b149c74-8b6f-43b1-a142-2f740019d585/download\\\", \\n \\\"filename\\\": \\\"2-shortish_theodicy-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/8bf7dc9e-f93a-4f30-9171-0733b886e2f4/submissions/5b149c74-8b6f-43b1-a142-2f740019d585\\\", \\n \\\"uuid\\\": \\\"5b149c74-8b6f-43b1-a142-2f740019d585\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/submissions/0092e003-7bc6-41e2-8e30-ef41eae27746/download\\\", \\n \\\"filename\\\": \\\"1-floored_schnapps-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/submissions/0092e003-7bc6-41e2-8e30-ef41eae27746\\\", \\n \\\"uuid\\\": \\\"0092e003-7bc6-41e2-8e30-ef41eae27746\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/submissions/bf2168b7-95a4-4c8a-bbc5-14738c38014b/download\\\", \\n \\\"filename\\\": \\\"2-floored_schnapps-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/a961f0ed-d0e5-4f25-badc-4cf220a71416/submissions/bf2168b7-95a4-4c8a-bbc5-14738c38014b\\\", \\n \\\"uuid\\\": \\\"bf2168b7-95a4-4c8a-bbc5-14738c38014b\\\"\\n }\\n ]\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_download_reply.json b/data/test_download_reply.json index f62ec89c3..58e78775c 100644 --- a/data/test_download_reply.json +++ b/data/test_download_reply.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:31:58 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"995\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1OCBHTVQifX0.DqEajg.ARAONfzm1qwFhUGJhgbj3oqFkYY; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc/download\"}+2": "{\"headers\": {\"Expires\": \"Fri, 12 Oct 2018 05:31:59 GMT\", \"Content-Type\": \"application/json\", \"Last-Modified\": \"Thu, 11 Oct 2018 17:31:36 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1OSBHTVQifX0.DqEajw.xkXUHch05cVqTcobnWNmVaRTaS4; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Etag\": \"\\\"sha256:a53a1e10fcaca9ec40889647f72133b011fba2eee6c6ce251870dabdf253a653\\\"\", \"Content-Disposition\": \"attachment; filename=3-rose-colored_rifle-reply.gpg\", \"Content-Length\": \"1116\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Cache-Control\": \"public, max-age=43200\", \"Date\": \"Thu, 11 Oct 2018 17:31:59 GMT\", \"X-Origin-Content-Type\": \"application/json\"}, \"body\": \"{\\\"filename\\\": \\\"01599391-8094-447e-9a98-86290f2aff6f\\\"}\", \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"eb750345-5c40-4ced-acf2-6f8b27298c68\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-datable_syncopation-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies/a884c037-320d-40d0-9764-0af4241eb35b\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"a884c037-320d-40d0-9764-0af4241eb35b\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-datable_syncopation-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies/7c8945b4-7f59-413d-994d-37a85da429b8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"7c8945b4-7f59-413d-994d-37a85da429b8\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0MTowMSBHTVQifX0.DqYAPQ.Fh6DlFTKUWOGxS1xm6BjCiRyb4Y; HttpOnly; Path=/\", \"Content-Length\": \"1973\", \"Date\": \"Mon, 15 Oct 2018 10:41:01 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68/download\"}+2": "{\"body\": \"{\\\"filename\\\": \\\"80eed7a8-9fd6-4f95-baa4-fc740a7b1b5b\\\"}\", \"version\": \"0.1.1\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0MTowMiBHTVQifX0.DqYAPg.Opm78odeqggdZxWWC4NbqiiatMM; HttpOnly; Path=/\", \"Cache-Control\": \"public, max-age=43200\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Last-Modified\": \"Mon, 15 Oct 2018 10:40:29 GMT\", \"Content-Disposition\": \"attachment; filename=3-starry-eyed_shaping-reply.gpg\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Etag\": \"\\\"sha256:c8a250d083f37d2ea184dc37b84b887af5a9e1c09f260049a8668ad91e9e05cd\\\"\", \"X-Origin-Content-Type\": \"application/json\", \"Expires\": \"Mon, 15 Oct 2018 22:41:02 GMT\", \"Date\": \"Mon, 15 Oct 2018 10:41:02 GMT\", \"Content-Length\": \"1116\"}, \"status\": 200}"} \ No newline at end of file diff --git a/data/test_download_submission.json b/data/test_download_submission.json index bbc373c74..a9a4517b7 100644 --- a/data/test_download_submission.json +++ b/data/test_download_submission.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"1039\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMCBHTVQifX0.DqEakA.9oQ4CoOdcJ45LFsTvG5UilBrEs4; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:32:00 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\"}+2": "{\"body\": \"{\\\"filename\\\": \\\"72c1544c-2ed0-4930-b273-e1364a4ef008\\\"}\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Last-Modified\": \"Thu, 11 Oct 2018 17:31:36 GMT\", \"Content-Length\": \"604\", \"Vary\": \"Cookie\", \"Expires\": \"Fri, 12 Oct 2018 05:32:00 GMT\", \"X-Origin-Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMCBHTVQifX0.DqEakA.9oQ4CoOdcJ45LFsTvG5UilBrEs4; HttpOnly; Path=/\", \"Etag\": \"\\\"sha256:ffccee92463b6d07d0c24a4834988396197d4b4d6f1b962dccab08d2503de08f\\\"\", \"Date\": \"Thu, 11 Oct 2018 17:32:00 GMT\", \"Cache-Control\": \"public, max-age=43200\", \"Content-Type\": \"application/json\", \"Content-Disposition\": \"attachment; filename=1-rose-colored_rifle-msg.gpg\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\"}+3": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n}\\n\", \"headers\": {\"Content-Length\": \"468\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMSBHTVQifX0.DqEakQ.7QOj9jp6BKASlpyampy-sFJZrZs; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:32:01 GMT\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/8d71c240-6997-4836-9652-f3db95908372/download\\\", \\n \\\"filename\\\": \\\"1-datable_syncopation-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/8d71c240-6997-4836-9652-f3db95908372\\\", \\n \\\"uuid\\\": \\\"8d71c240-6997-4836-9652-f3db95908372\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/9d71e656-fae1-4f1c-b7dd-9c6a77b23ce8/download\\\", \\n \\\"filename\\\": \\\"2-datable_syncopation-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/9d71e656-fae1-4f1c-b7dd-9c6a77b23ce8\\\", \\n \\\"uuid\\\": \\\"9d71e656-fae1-4f1c-b7dd-9c6a77b23ce8\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NDoyOSBHTVQifX0.DqYBDQ.VdOIVvB-wp6QMdqIfO9JTh8nthw; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:44:29 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2057\", \"Content-Type\": \"application/json\"}, \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\"}+2": "{\"headers\": {\"Cache-Control\": \"public, max-age=43200\", \"Content-Disposition\": \"attachment; filename=1-starry-eyed_shaping-msg.gpg\", \"Last-Modified\": \"Mon, 15 Oct 2018 10:40:29 GMT\", \"Vary\": \"Cookie\", \"Etag\": \"\\\"sha256:aacdde2b18d477a6f40d3c91d0e8ed41ddcfb3b4a2055535013cfaf859b29026\\\"\", \"Date\": \"Mon, 15 Oct 2018 10:44:30 GMT\", \"Content-Length\": \"604\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Expires\": \"Mon, 15 Oct 2018 22:44:30 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NDozMCBHTVQifX0.DqYBDg.fiu8AhZ_1VJFS6XVzFe4iqMTcJs; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"X-Origin-Content-Type\": \"application/json\"}, \"body\": \"{\\\"filename\\\": \\\"0b949046-0baa-4a23-bedf-088bfff66660\\\"}\", \"version\": \"0.1.1\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\"}+3": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n}\\n\", \"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NDozMSBHTVQifX0.DqYBDw.vt3ieWFsgnUGvJdeJgP9ewEhrtg; HttpOnly; Path=/\", \"Content-Length\": \"469\", \"Date\": \"Mon, 15 Oct 2018 10:44:31 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}}"} \ No newline at end of file diff --git a/data/test_error_unencrypted_reply.json b/data/test_error_unencrypted_reply.json index 2fdd5ad44..fd3902d74 100644 --- a/data/test_error_unencrypted_reply.json +++ b/data/test_error_unencrypted_reply.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:02 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2630\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMiBHTVQifX0.DqEakg.WapJ1mFcEOp9c-jO_OpQyMpmIvg; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfne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HDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}", "{\"body\": \"{\\\"reply\\\": \\\"hello\\\"}\", \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"You must encrypt replies client side\\\"\\n}\\n\", \"status\": 400, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMiBHTVQifX0.DqEakw.HI9_y2Vzvg4gIV4oW9d3b93mooY; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:03 GMT\", \"Content-Length\": \"56\"}}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905oh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t8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation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BYCAwECHgECF4AACgkQn6EGbC8pRwXMYw//\\\\nfHo/CLGbpyaUGDh6jCU6ZtstCuWwjiyG4gawCS/f5WTShmcamGDN0L3QVzFK10cq\\\\nDpnJ1bb53bG9lqTdUapru6YEYV/F+snRGxUXAqBPFo7zr3qyiJL+UmftNKZiQN26\\\\nb8bvf4vvhHOMlj4Z46wxuBBZlDfJSa+geXeObxLOkhnwpFCBxIf6qErIliwCcIGj\\\\ntrHSJcChPthaKzfE2iZaQyIWaVQ4i5N9aJ61yhFyz/zBulCVBhr++5QVki8rav0+\\\\nrzxDQADly6vWPctiHh4giMfeZq1yOXfV5D62w6WhM0hmpQwikuxu9CkSEmcKbtjS\\\\nh/2BgfZGUMwyX90cJfFgKSB7mWYyxiMQLLehtVH7utMY8tmvBHQCMmwmm06XLLYa\\\\nuRDnh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"5241\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Mon, 15 Oct 2018 10:45:06 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NTowNiBHTVQifX0.DqYBMg.2aEX-76z4uuXPkirkKQaw0M7Xv8; HttpOnly; Path=/\"}, \"status\": 200}", "{\"body\": \"{\\\"reply\\\": \\\"hello\\\"}\", \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\"}+2": "{\"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"56\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NTowNiBHTVQifX0.DqYBMg.2aEX-76z4uuXPkirkKQaw0M7Xv8; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:45:06 GMT\"}, \"body\": \"{\\n \\\"message\\\": \\\"You must encrypt replies client side\\\"\\n}\\n\", \"status\": 400, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_failed_single_source.json b/data/test_failed_single_source.json index 5cb6b6026..2a23aac02 100644 --- a/data/test_failed_single_source.json +++ b/data/test_failed_single_source.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/not there\"}+1": "{\"headers\": {\"Content-Length\": \"166\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:03 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowMyBHTVQifX0.DqEakw.GmE0nwEjrDgbnUq1aydIahPgfuk; HttpOnly; Path=/\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\", \"status\": 404}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"headers\": {\"Content-Length\": \"73\", \"Date\": \"Mon, 15 Oct 2018 10:39:23 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOToyMyBHTVQifX0.DqX_2w.Sik0joWMM7s1KwgKUB7IUL7Q_tI; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"status\": 403, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/not there\"}+1": "{\"status\": 404, \"version\": \"0.1.1\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOToyMyBHTVQifX0.DqX_2w.Sik0joWMM7s1KwgKUB7IUL7Q_tI; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"166\", \"Date\": \"Mon, 15 Oct 2018 10:39:23 GMT\"}, \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_flag_source.json b/data/test_flag_source.json index 2df523411..5df96db12 100644 --- a/data/test_flag_source.json +++ b/data/test_flag_source.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBE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uQ7QiMM01l\\\\nyzF2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Length\": \"2630\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowNCBHTVQifX0.DqEalA.YnCiXo4a3RR2VnIZtJqYfII1X0o; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:04 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/flag\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Source flagged for reply\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowNSBHTVQifX0.DqEalQ.eYHj2mFSrAWyJ6FnsipX2X22U3A; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:05 GMT\", \"Content-Length\": \"44\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\"}+3": "{\"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:05 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2530\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowNSBHTVQifX0.DqEalQ.eYHj2mFSrAWyJ6FnsipX2X22U3A; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\\\\nPW03L1SJSCwYC/l30craQDCG57zUkjR9g5K+tWpZXtfVMc2d8fDSxz9U3khPxAue\\\\n165tVrIFbyRdy/bzVNcw7nvxF66E08tM/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K-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n}\\n\", \"status\": 200}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:46:04 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"5241\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNCBHTVQifX0.DqYBbA.pLo6QcfFWehvNU7t8DTjQQm4MAQ; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\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5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp4iNf7ouzpHkC4WyfbyzycJYLw38mfIrr5Ijdte/24\\\\nTKN+clhFgnNHA//C/n7ZmS91bkXfFWG8sYD4j1i0qDzVMKOT673ksDAXSMc2pupr\\\\nwi5F79T/5JnxAhWsIgFoaPIxYfL9NMnPFuqnWHNZfYXn1dRW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type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"body\": null, \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/flag\"}+2": "{\"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Source flagged for reply\\\"\\n}\\n\", \"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:46:05 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNSBHTVQifX0.DqYBbQ.ndjLePg2lNaN6seJpMXz7Gh8el4; HttpOnly; Path=/\", \"Content-Length\": \"44\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+3": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:46:06 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNiBHTVQifX0.DqYBbg.M7lNhjK3NZ73r_G98uky_HSQlkY; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT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f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_all_replies.json b/data/test_get_all_replies.json index 203d7ac8e..ed6ab880a 100644 --- a/data/test_get_all_replies.json +++ b/data/test_get_all_replies.json @@ -1 +1 @@ -{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-wingless_howler-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies/a7d1ce73-60f5-4a40-a571-4a151a5e8bd2\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"a7d1ce73-60f5-4a40-a571-4a151a5e8bd2\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-wingless_howler-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies/61746472-907a-43e4-9da9-66fa305e5430\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"61746472-907a-43e4-9da9-66fa305e5430\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-corinthian_bran-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies/e6583ca6-c267-49d0-baee-b47a55bbc916\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"e6583ca6-c267-49d0-baee-b47a55bbc916\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-corinthian_bran-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"50c3e541-4c34-4ad4-9c99-9b00e1f294e2\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies/4de16fb1-5373-4485-a699-dfb1b4251e6f\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"4de16fb1-5373-4485-a699-dfb1b4251e6f\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNjo1MCBHTVQifX0.DqEbsg.1eoer66-yvWHTTyUVA-eBl7bLUk; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:36:50 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"1957\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:46:04 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"5241\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNCBHTVQifX0.DqYBbA.pLo6QcfFWehvNU7t8DTjQQm4MAQ; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\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wsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ7lj3fkt9c+iMDRAA\\\\njjLrabgn2e2012+n5eIUus6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp4iNf7ouzpHkC4WyfbyzycJYLw38mfIrr5Ijdte/24\\\\nTKN+clhFgnNHA//C/n7ZmS91bkXfFW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lW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"body\": null, \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/flag\"}+2": "{\"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Source flagged for reply\\\"\\n}\\n\", \"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:46:05 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNSBHTVQifX0.DqYBbQ.ndjLePg2lNaN6seJpMXz7Gh8el4; HttpOnly; Path=/\", \"Content-Length\": \"44\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+3": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:46:06 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNiBHTVQifX0.DqYBbg.M7lNhjK3NZ73r_G98uky_HSQlkY; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM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I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"version\": \"0.1.1\", \"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:47:53 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"1973\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Nzo1MyBHTVQifX0.DqYB2Q.mRegrKhwxli3z0JUEhBO6l9xgcw; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"eb750345-5c40-4ced-acf2-6f8b27298c68\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-datable_syncopation-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies/a884c037-320d-40d0-9764-0af4241eb35b\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"a884c037-320d-40d0-9764-0af4241eb35b\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-datable_syncopation-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies/7c8945b4-7f59-413d-994d-37a85da429b8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"7c8945b4-7f59-413d-994d-37a85da429b8\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_all_submissions.json b/data/test_get_all_submissions.json index bbd1f6923..35cfa0ecb 100644 --- a/data/test_get_all_submissions.json +++ b/data/test_get_all_submissions.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:34:56.537133Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwODA5NiwiaWF0IjoxNTM5Mjc5Mjk2fQ.eyJpZCI6MX0.DJS73iQrlXFKmpTAGX5G1kT_35qGJTH5TYB4Vyhe850\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNDo1NiBHTVQifX0.DqEbQA.IY36ZE2JKCoToMoPVznvSrgzgc0; HttpOnly; Path=/\", \"Content-Length\": \"188\", \"Date\": \"Thu, 11 Oct 2018 17:34:56 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/e2d452d4-5073-498b-b66a-17f7d4d08d5c/download\\\", \\n \\\"filename\\\": \\\"1-wingless_howler-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/e2d452d4-5073-498b-b66a-17f7d4d08d5c\\\", \\n \\\"uuid\\\": \\\"e2d452d4-5073-498b-b66a-17f7d4d08d5c\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/46c91d7c-091f-487b-8b0b-c89808b6573e/download\\\", \\n \\\"filename\\\": \\\"2-wingless_howler-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions/46c91d7c-091f-487b-8b0b-c89808b6573e\\\", \\n \\\"uuid\\\": \\\"46c91d7c-091f-487b-8b0b-c89808b6573e\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/5ba450ac-ea4d-45b0-8040-bab6510679fe/download\\\", \\n \\\"filename\\\": \\\"1-corinthian_bran-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/5ba450ac-ea4d-45b0-8040-bab6510679fe\\\", \\n \\\"uuid\\\": \\\"5ba450ac-ea4d-45b0-8040-bab6510679fe\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/e9c56553-c926-41a2-a55d-1cc628edf1e7/download\\\", \\n \\\"filename\\\": \\\"2-corinthian_bran-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions/e9c56553-c926-41a2-a55d-1cc628edf1e7\\\", \\n \\\"uuid\\\": \\\"e9c56553-c926-41a2-a55d-1cc628edf1e7\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:34:57 GMT\", \"Content-Length\": \"2041\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNDo1NyBHTVQifX0.DqEbQQ.8uz5qe-ivXs3UkFB1zBRxub33uU; HttpOnly; Path=/\"}, \"status\": 200}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:46:04 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"5241\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNCBHTVQifX0.DqYBbA.pLo6QcfFWehvNU7t8DTjQQm4MAQ; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\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ApBQJbxG6cAhsv\\\\nBQkB4UYkBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ7lj3fkt9c+iMDRAA\\\\njjLrabgn2e2012+n5eIUus6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp4iNf7ouzpHkC4WyfbyzycJYLw38mfIrr5Ijdte/24\\\\nT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U6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"body\": null, \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/flag\"}+2": "{\"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Source flagged for reply\\\"\\n}\\n\", \"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:46:05 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNSBHTVQifX0.DqYBbQ.ndjLePg2lNaN6seJpMXz7Gh8el4; HttpOnly; Path=/\", \"Content-Length\": \"44\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+3": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:46:06 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjowNiBHTVQifX0.DqYBbg.M7lNhjK3NZ73r_G98uky_HSQlkY; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6I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L7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/replies\"}+1": "{\"version\": \"0.1.1\", \"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:47:53 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"1973\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Nzo1MyBHTVQifX0.DqYB2Q.mRegrKhwxli3z0JUEhBO6l9xgcw; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"eb750345-5c40-4ced-acf2-6f8b27298c68\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"3-datable_syncopation-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies/a884c037-320d-40d0-9764-0af4241eb35b\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"a884c037-320d-40d0-9764-0af4241eb35b\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-datable_syncopation-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies/7c8945b4-7f59-413d-994d-37a85da429b8\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"7c8945b4-7f59-413d-994d-37a85da429b8\\\"\\n }\\n ]\\n}\\n\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/submissions\"}+1": "{\"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:47:55 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2056\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Nzo1NSBHTVQifX0.DqYB2w.ZsC9zECVmUJJOiftGbF0aXddmrI; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/8d71c240-6997-4836-9652-f3db95908372/download\\\", \\n \\\"filename\\\": \\\"1-datable_syncopation-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/8d71c240-6997-4836-9652-f3db95908372\\\", \\n \\\"uuid\\\": \\\"8d71c240-6997-4836-9652-f3db95908372\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/9d71e656-fae1-4f1c-b7dd-9c6a77b23ce8/download\\\", \\n \\\"filename\\\": \\\"2-datable_syncopation-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions/9d71e656-fae1-4f1c-b7dd-9c6a77b23ce8\\\", \\n \\\"uuid\\\": \\\"9d71e656-fae1-4f1c-b7dd-9c6a77b23ce8\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_current_user.json b/data/test_get_current_user.json index 75269354d..54ab1391f 100644 --- a/data/test_get_current_user.json +++ b/data/test_get_current_user.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"headers\": {\"Content-Length\": \"73\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:08 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOCBHTVQifX0.DqEamA.Rz19VDYyhFF2_UvVptjQBdct478; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"version\": \"0.1.1\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/user\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"151\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-11T17:32:07.242517Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\"\\n}\\n\"}"} \ No newline at end of file +{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"version\": \"0.1.1\", \"status\": 403, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOToyOSBHTVQifX0.DqX_4Q.aaA3zESPgWZWhqRfJBX2EIJ1JOY; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Content-Length\": \"73\", \"Date\": \"Mon, 15 Oct 2018 10:39:29 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/user\"}+1": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Content-Length\": \"151\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjozOTozMCBHTVQifX0.DqX_4g.ZqmyWKUsiiLezPcUqa_RXv6rfn4; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Mon, 15 Oct 2018 10:39:30 GMT\"}, \"body\": \"{\\n \\\"is_admin\\\": true, \\n \\\"last_login\\\": \\\"2018-10-15T10:39:03.762045Z\\\", \\n \\\"username\\\": \\\"journalist\\\", \\n \\\"uuid\\\": \\\"eb4a8050-7eb7-496a-ae75-1ef66db677bc\\\"\\n}\\n\"}"} \ No newline at end of file diff --git a/data/test_get_replies_from_source.json b/data/test_get_replies_from_source.json index a93da6a69..7a9db5e47 100644 --- a/data/test_get_replies_from_source.json +++ b/data/test_get_replies_from_source.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjowOSBHTVQifX0.DqEamQ.1TsgL7NmeGyP5iKXFUKadjZZPww; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:09 GMT\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\\\\nPW03L1SJSCwYC/l30craQDCG57zUkjR9g5K+tWpZXtfVMc2d8fDSxz9U3khPxAue\\\\n165tVrIFbyRdy/bzVNcw7nvxF66E08tM/DIasPkakQLm5c+VC06aVBIVDwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UlZNTjJOWEc3UFlDWEdJTlNLVjNMVlpHUEEz\\\\nWFJNUUNKTjRIWURIUDJBNE1QU1U0NzI0SEFVVkZQVklNTDVIQU9LREJJNkVWTElX\\\\nREMyNUg2RVVTTkRHVklRWEhWSk4yUVRBUUpCUT0+iQI/BBMBCgApBQJbv4j1Ahsv\\\\nBQkB4OXLBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQXPcs0GGMHTaWWw//\\\\nQccEqJq+KT4INB1sF1qgM6GG+9IN3nlniPrBqgmuFT8VfMit6UIKFSuQ7QiMM01l\\\\nyzF2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"status\": 200, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMCBHTVQifX0.DqEamg.dT-dB-JqNy2NCg1RuIf7JxmV4kA; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:10 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"995\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz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+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp4iNf7ouzpHkC4WyfbyzycJYLw38mfIrr5Ijdte/24\\\\nTKN+clhFgnNHA//C/n7ZmS91bkXfFWG8sYD4j1i0qDzVMKOT673ksDAXSMc2pupr\\\\nwi5F79T/5JnxAhWsIgFoaPIxYfL9NMnPFuqnWHNZfYXn1dRWr9GiArGzTQARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8M04zQVVIWVhWSFVGR0E2QzJUV0tZVDQ1QUVH\\\\nWFBVUUxTTjY2SjI1RlgyN0tOQktPSVRDNkhMQllRWTRKN0JMVjNENU41QUVCRkxO\\\\nQVZVNU1UTzdFWkJOSldMRVNJSUYyTUZOT1VNQT0+iQI/BBMBCgApBQJbxG6fAhsv\\\\nBQkB4UYhBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQn6EGbC8pRwXMYw//\\\\nfHo/CLGbpyaUGDh6jCU6ZtstCuWwjiyG4gawCS/f5WTShmcamGDN0L3QVzFK10cq\\\\nDpnJ1bb53bG9lqTdUapru6YEYV/F+snRGxUXAqBPFo7zr3qyiJL+UmftNKZiQN26\\\\nb8bvf4vvhHOMlj4Z46wxuBBZlDfJSa+geXeObxLOkhnwpFCBxIf6qErIliwCcIGj\\\\ntrHSJcChPthaKzfE2iZaQyIWaVQ4i5N9aJ61yhFyz/zBulCVBhr++5QVki8rav0+\\\\nrzxDQADly6vWPctiHh4giMfeZq1yOXfV5D62w6WhM0hmpQwikuxu9CkSEmcKbtjS\\\\nh/2BgfZGUMwyX90cJfFgKSB7mWYyxiMQLLehtVH7utMY8tmvBHQCMmwmm06XLLYa\\\\nuRDnh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:25 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjoyNSBHTVQifX0.DqYBgQ.dharDRwzCrb64xPr3M6G8N5uA7E; HttpOnly; Path=/\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\"}+2": "{\"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"eb750345-5c40-4ced-acf2-6f8b27298c68\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0NjoyNiBHTVQifX0.DqYBgg.t1ZrcNszo0nyGfeB7QXUg1Nym4k; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Content-Length\": \"997\", \"Content-Type\": \"application/json\", \"Date\": \"Mon, 15 Oct 2018 10:46:26 GMT\"}, \"version\": \"0.1.1\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_reply_from_source.json b/data/test_get_reply_from_source.json index 598ef056c..1dadf79ba 100644 --- a/data/test_get_reply_from_source.json +++ b/data/test_get_reply_from_source.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKn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\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2629\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMSBHTVQifX0.DqEamw.VieMcDALyGO4xtkbAmgdd_HMz-U; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:11 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"c4a30e17-2af9-4ebf-8e6f-6cc9a9f8f4bd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"995\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMSBHTVQifX0.DqEamw.VieMcDALyGO4xtkbAmgdd_HMz-U; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:11 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\"}+3": "{\"version\": \"0.1.1\", \"headers\": {\"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:12 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMiBHTVQifX0.DqEanA.F5IaGeYQZ7c8kZLzBx42r47OYEw; HttpOnly; Path=/\", \"Content-Length\": \"445\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\"}, \"status\": 200, \"body\": \"{\\n \\\"filename\\\": \\\"3-rose-colored_rifle-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"65b09911-5a01-4ccc-97de-2025786ea2c7\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies/1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"1d29a61a-fc1f-4ec1-9be6-7baac3f940fc\\\"\\n}\\n\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Mon, 15 Oct 2018 10:46:46 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo0NiBHTVQifX0.DqYBlg.AOU-MLcIop4rWxjsG1ETiZmDjHE; HttpOnly; Path=/\", \"Content-Length\": \"5240\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2X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\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8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ctiHh4giMfeZq1yOXfV5D62w6WhM0hmpQwikuxu9CkSEmcKbtjS\\\\nh/2BgfZGUMwyX90cJfFgKSB7mWYyxiMQLLehtVH7utMY8tmvBHQCMmwmm06XLLYa\\\\nuRDnh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\"}+2": "{\"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo0NyBHTVQifX0.DqYBlw.KU8mEDN47bUI2Rs8wNp8CyTAGrY; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"997\", \"Date\": \"Mon, 15 Oct 2018 10:46:47 GMT\"}, \"body\": \"{\\n \\\"replies\\\": [\\n {\\n \\\"filename\\\": \\\"3-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"eb750345-5c40-4ced-acf2-6f8b27298c68\\\"\\n }, \\n {\\n \\\"filename\\\": \\\"4-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"3a1ae2ec-2e73-447c-be9f-cfcebdb4e38e\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68\"}+3": "{\"status\": 200, \"headers\": {\"Content-Length\": \"446\", \"Date\": \"Mon, 15 Oct 2018 10:46:48 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo0OCBHTVQifX0.DqYBmA.1ta1GvpAOgufHGL-ENfK38e2HUo; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"filename\\\": \\\"3-starry-eyed_shaping-reply.gpg\\\", \\n \\\"is_deleted_by_source\\\": false, \\n \\\"journalist_username\\\": \\\"journalist\\\", \\n \\\"journalist_uuid\\\": \\\"bc175c3f-7559-46a6-b26b-d7c88ed5b136\\\", \\n \\\"reply_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies/eb750345-5c40-4ced-acf2-6f8b27298c68\\\", \\n \\\"size\\\": 1116, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"eb750345-5c40-4ced-acf2-6f8b27298c68\\\"\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file diff --git a/data/test_get_single_source.json b/data/test_get_single_source.json index b7ed5911e..04f24a4d2 100644 --- a/data/test_get_single_source.json +++ b/data/test_get_single_source.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7g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VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMyBHTVQifX0.DqEanQ.JhUzbQtUDYNcqbhelVEGb3H90Go; HttpOnly; Path=/\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:13 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\"}+2": "{\"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\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ixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxMyBHTVQifX0.DqEanQ.JhUzbQtUDYNcqbhelVEGb3H90Go; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:13 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2530\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2ri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KFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0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B7mWYyxiMQLLehtVH7utMY8tmvBHQCMmwmm06XLLYa\\\\nuRDnh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9JK8ini+Wce2EQt7+\\\\nBltumD5vEsZGcpTaKTLsQ9RWvtvg0A5Viv7q+/eLyvMFRzNF1Tp3EsI84QARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UDNIWTRTMkhPQkVGR1M0R0JTTExURkNNTFFL\\\\nU0lMR1g2NVlDRk42NlFVWVdSS1RIUFJOV1hWRjNFUU9XSkFFRFJZQlQ3QVlLQ1VX\\\\nWU1aSVFES0FHWVZZUEZMSU1NSlhOVFROUU9NQT0+iQI/BBMBCgApBQJbxG6cAhsv\\\\nBQkB4UYkBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ7lj3fkt9c+iMDRAA\\\\njjLrabgn2e2012+n5eIUus6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}"} \ No newline at end of file diff --git a/data/test_get_single_source_from_string.json b/data/test_get_single_source_from_string.json index 433acd1e4..04f24a4d2 100644 --- a/data/test_get_single_source_from_string.json +++ b/data/test_get_single_source_from_string.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:14 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNCBHTVQifX0.DqEang.L7VrOza7MVY92H8EYjyCr2mVB0c; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5s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q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\"}+2": "{\"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\\\\nPW03L1SJSCwYC/l30craQDCG57zUkjR9g5K+tWpZXtfVMc2d8fDSxz9U3khPxAue\\\\n165tVrIFbyRdy/bzVNcw7nvxF66E08tM/DIasPkakQLm5c+VC06aVBIVDwARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UlZNTjJOWEc3UFlDWEdJTlNLVjNMVlpHUEEz\\\\nWFJNUUNKTjRIWURIUDJBNE1QU1U0NzI0SEFVVkZQVklNTDVIQU9LREJJNkVWTElX\\\\nREMyNUg2RVVTTkRHVklRWEhWSk4yUVRBUUpCUT0+iQI/BBMBCgApBQJbv4j1Ahsv\\\\nBQkB4OXLBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQXPcs0GGMHTaWWw//\\\\nQccEqJq+KT4INB1sF1qgM6GG+9IN3nlniPrBqgmuFT8VfMit6UIKFSuQ7QiMM01l\\\\nyzF2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n}\\n\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:15 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNSBHTVQifX0.DqEanw.eOwz0Qy3h2kwC9vdDZFFnvDqXeU; HttpOnly; Path=/\", \"Content-Length\": \"2530\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9JK8ini+Wce2EQt7+\\\\nBltumD5vEsZGcpTaKTLsQ9RWvtvg0A5Viv7q+/eLyvMFRzNF1Tp3EsI84QARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UDNIWTRTMkhPQkVGR1M0R0JTTExURkNNTFFL\\\\nU0lMR1g2NVlDRk42NlFVWVdSS1RIUFJOV1hWRjNFUU9XSkFFRFJZQlQ3QVlLQ1VX\\\\nWU1aSVFES0FHWVZZUEZMSU1NSlhOVFROUU9NQT0+iQI/BBMBCgApBQJbxG6cAhsv\\\\nBQkB4UYkBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ7lj3fkt9c+iMDRAA\\\\njjLrabgn2e2012+n5eIUus6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp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ZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDO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g36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}"} \ No newline at end of file diff --git a/data/test_get_sources.json b/data/test_get_sources.json index 01382aa27..04f24a4d2 100644 --- a/data/test_get_sources.json +++ b/data/test_get_sources.json @@ -1 +1 @@ -{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"wingless howler\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iZMBEACUDbVOFlpWWeOugPWX5dX1sBGaduX1P01XO27dgFUedd7Rqe51\\\\nNLelyIWFocRg+Ee+c0sskEr+zih3s4n+A4Vjyn2fZjapaoHYCbosv8A1C9AXtQip\\\\n6F5k099stXUsl2iP3q5Bq1r4osWXH6z6/5pWYpl8JdLEpbx2K1OmVr44PaCO3wTA\\\\nlzHTYJYtDV9ZvQzJbD76nxD+rsueUKTjTQ32ot51QG0mQmcX3d+PTOlbOodMsu9d\\\\nnOfTf7JeYg/7eLlP3ACVUH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vu1PK\\\\nHKmqjC+gl/4i5EgfWVerNSGBH+MwoNrQp10lmNhIFBKts3iVBkVerXeyHnvJcYpZ\\\\nclZagGth7pfw3RS1QFNZbTcNYnwAp0UBczKvkhwniB/BjIkaHQ3Gu8HYd3jqKEI5\\\\nV2BSPNe4mV5hKIGdelp6BA/yh1LRl6KUzHsDs5qDmgHSRychkBAEbgPsHkRqJjW5\\\\nNm0/CPUMmcX6dEMMY9OwEYVX5ZllfbzOUQlwxx2h6tG6snmewbl3USbGy/QR2Abv\\\\n3N4xRwhgFEhZChmje4KAmV7LQiZTjZg6QXO9LV4YXMr9gerAm/q4TuFk7Z5p5phH\\\\n4egWb6umT6Tj/Mud2vrYSIPu0byroQxSZbU0hYeRGAg=\\\\n=lewJ\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:12.587473Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\", \\n \\\"uuid\\\": \\\"988c1d6a-ef11-4eec-bdc1-e23acefd5548\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"corinthian bran\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----B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\nMfaRmAcy8SGkFkcNF3RWhrSCdx3q/QCky/UmRNacDDVvW5qEP/hIQdvmPZJuPgCV\\\\n+z4D+zsDWCT5h4lXeFiS9pUIzIylqafsuG4QjXQCYEsI5C+lu6Tg1eiGCr/G7KMD\\\\nr5909C+O3NYDErFw/PRrcVeaHQmDzaV9iexNNRdPhdtnnSs9QmwumGXvF4ey5wx5\\\\nIxCtyqm/+Ymd/VK6BKSOgzeJG8/EnUOxii/RiTrQgZAAo6DSHAgra6sH+ve+VM1g\\\\nBS+V+uUIc0gczS30mpYMcaX5hhO0P7Ni7YMWT5U5snsGrIOhTFYhD6Nj5Cs2797c\\\\nu7ZePcT1yzvQC++TtBxXbLfu9UFLVeLZHabAeWJDj+CwbF6a/W0PsY9g+uAN5wo+\\\\nY0IoOm3HqbFfwazDLcJfCfA8oVSRBG1JhVQ/46e+q4moCtYhUAbqRwJA8OFzn9Qe\\\\nlIFkCCXZfJEIt0BHHRLhh4hYeyFpjz1e606yKLQmJjEOGp2AaZWNTJuRGbe5kUJ7\\\\nWZiYIxXANqMxqQqCadYgUGsIoC7siM8XvHfXHhiRQw48nfLm2WANZXbMHcQGIsIq\\\\n0fPCLjheb0Z4WF9TSzywkzqfGsD97BGcQs9vvuUNvQph44ji8S1EWYnAlOgq67Hg\\\\nJ07IntwVZmjhhsxM/8PyPO4lI2TK/1cFJ8XZywvzFSo=\\\\n=nKT/\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:34:16.492201Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\", \\n \\\"uuid\\\": \\\"8bb0bbdb-692e-4dcd-9833-4d48cbd9e143\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:36:33 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"5233\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozNjozMyBHTVQifX0.DqEboQ.gTPKFusa5NW6aSv9-LzrsyriAdQ; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\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6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp4iNf7ouzpHkC4WyfbyzycJYLw38mfIrr5Ijdte/24\\\\nTKN+clhFgnNHA//C/n7ZmS91bkXfFWG8sYD4j1i0qDzVMKOT673ksDAXSMc2pupr\\\\nwi5F79T/5JnxAhWsIgFoaPIxYfL9NMnPFuqnWHNZ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", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa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83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}"} \ No newline at end of file diff --git a/data/test_get_submission.json b/data/test_get_submission.json index c51c5a025..49dc59990 100644 --- a/data/test_get_submission.json +++ b/data/test_get_submission.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+2": "{\"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:16 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"73\", \"Vary\": \"Cookie\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNiBHTVQifX0.DqEaoA.9uLYRCG-kmQ9yET--QWAqlCjqjU; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"error\\\": \\\"Forbidden\\\", \\n \\\"message\\\": \\\"Token authentication failed.\\\"\\n}\\n\", \"status\": 403}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"headers\": {\"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxNyBHTVQifX0.DqEaoQ.sTQOA8NF77Eoq5jevspK3vSH5FY; HttpOnly; Path=/\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:17 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7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hqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\"}+2": "{\"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:18 GMT\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxOCBHTVQifX0.DqEaog.y71M_hEEcATXPfTjaA6nFTi3Ir4; HttpOnly; Path=/\", \"Content-Length\": \"1038\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\"}+3": "{\"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:18 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxOCBHTVQifX0.DqEaog.y71M_hEEcATXPfTjaA6nFTi3Ir4; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"468\", \"Vary\": \"Cookie\"}, \"status\": 200, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9J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5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12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7utMY8tmvBHQCMmwmm06XLLYa\\\\nuRDnh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9JK8ini+Wce2EQt7+\\\\nBltumD5vEsZGcpTaKTLsQ9RWvtvg0A5Viv7q+/eLyvMFRzNF1Tp3EsI84QARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UDNIWTRTMkhPQkVGR1M0R0JTTExURkNNTFFL\\\\nU0lMR1g2NVlDRk42NlFVWVdSS1RIUFJOV1hWRjNFUU9XSkFFRFJZQlQ3QVlLQ1VX\\\\nWU1aSVFES0FHWVZZUEZMSU1NSlhOVFROUU9NQT0+iQI/BBMBCgApBQJbxG6cAhsv\\\\nBQkB4UYkBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ7lj3fkt9c+iMDRAA\\\\njjLrabgn2e2012+n5eIUus6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMSBHTVQifX0.DqYB4Q.gZRj3stxg_oPAqFYMJhffTcu8hM; HttpOnly; Path=/\", \"Content-Length\": \"1040\", \"Date\": \"Mon, 15 Oct 2018 10:48:01 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\"}+3": "{\"headers\": {\"Content-Length\": \"469\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMiBHTVQifX0.DqYB4g.NvIYBZdgnQqn9Kwtqxum-6miRaQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:02 GMT\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_submission_from_string.json b/data/test_get_submission_from_string.json index 15342f296..49dc59990 100644 --- a/data/test_get_submission_from_string.json +++ b/data/test_get_submission_from_string.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoxOSBHTVQifX0.DqEaow.ZmRzzOfpPQKIxlOmmCIZiEEFZlc; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:19 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"2629\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zs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n5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\"}+2": "{\"status\": 200, \"headers\": {\"Content-Length\": \"1038\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Thu, 11 Oct 2018 17:32:20 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMCBHTVQifX0.DqEapA.vLvVcP3Gym1mhTzMw1y_ltIMvR0; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\"}+3": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMCBHTVQifX0.DqEapA.vLvVcP3Gym1mhTzMw1y_ltIMvR0; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Content-Length\": \"468\", \"Date\": \"Thu, 11 Oct 2018 17:32:20 GMT\"}, \"status\": 200, \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n}\\n\", \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9JK8ini+Wce2EQt7+\\\\nBltumD5vEsZGcpTaKTLsQ9RWvtvg0A5Viv7q+/eLyvMFRzNF1Tp3EsI84QAR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type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\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/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n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\\nBQkB4UYkBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ7lj3fkt9c+iMDRAA\\\\njjLrabgn2e2012+n5eIUus6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMSBHTVQifX0.DqYB4Q.gZRj3stxg_oPAqFYMJhffTcu8hM; HttpOnly; Path=/\", \"Content-Length\": \"1040\", \"Date\": \"Mon, 15 Oct 2018 10:48:01 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\"}+3": "{\"headers\": {\"Content-Length\": \"469\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMiBHTVQifX0.DqYB4g.NvIYBZdgnQqn9Kwtqxum-6miRaQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:02 GMT\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_submissions.json b/data/test_get_submissions.json index d8c44f3eb..49dc59990 100644 --- a/data/test_get_submissions.json +++ b/data/test_get_submissions.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJG9wWPyfQ+z4MnJCB3M4lv3H56l+\\\\nx3wh4UZhdb4v/YDP4fnmxJ3+L3Y7ewGwiOmUNToGDoNbcXj/aJjOz98w0XEIRo+k\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6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMSBHTVQifX0.DqEapQ.T68qYXo6bk97DCq_v50cqL58UTs; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"2629\", \"Date\": \"Thu, 11 Oct 2018 17:32:21 GMT\", \"Content-Type\": \"application/json\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\"}+2": "{\"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4/download\\\", \\n \\\"filename\\\": \\\"1-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/a0003983-2c49-4883-8837-7680c4a082a4\\\", \\n \\\"uuid\\\": \\\"a0003983-2c49-4883-8837-7680c4a082a4\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831/download\\\", \\n \\\"filename\\\": \\\"2-rose-colored_rifle-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions/f820d41c-4de1-43e8-973c-f6cfbb523831\\\", \\n \\\"uuid\\\": \\\"f820d41c-4de1-43e8-973c-f6cfbb523831\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMiBHTVQifX0.DqEapg.RGKv8JAvZ4uaEOEKYK0EsjiUHak; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:22 GMT\", \"Content-Length\": \"1038\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4m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TM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqT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q1yOXfV5D62w6WhM0hmpQwikuxu9CkSEmcKbtjS\\\\nh/2BgfZGUMwyX90cJfFgKSB7mWYyxiMQLLehtVH7utMY8tmvBHQCMmwmm06XLLYa\\\\nuRDnh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9JK8ini+Wce2EQt7+\\\\nBltumD5vEsZGcpTaKTLsQ9RWvtvg0A5Viv7q+/eLyvMFRzNF1Tp3EsI84QARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UDNIWTRTMkhPQkVG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248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMSBHTVQifX0.DqYB4Q.gZRj3stxg_oPAqFYMJhffTcu8hM; HttpOnly; Path=/\", \"Content-Length\": \"1040\", \"Date\": \"Mon, 15 Oct 2018 10:48:01 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\"}+3": "{\"headers\": {\"Content-Length\": \"469\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMiBHTVQifX0.DqYB4g.NvIYBZdgnQqn9Kwtqxum-6miRaQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:02 GMT\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n}\\n\", \"status\": 200}"} \ No newline at end of file diff --git a/data/test_get_wrong_submissions.json b/data/test_get_wrong_submissions.json index 712d0dee5..477a4a4e1 100644 --- a/data/test_get_wrong_submissions.json +++ b/data/test_get_wrong_submissions.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y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t2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"2629\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:22 GMT\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMiBHTVQifX0.DqEapg.RGKv8JAvZ4uaEOEKYK0EsjiUHak; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/rofl-missing/submissions\"}+2": "{\"version\": \"0.1.1\", \"status\": 404, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:23 GMT\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyMyBHTVQifX0.DqEapw.nTMk5oueFdGVGcFeYoiAbI7eJCU; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Length\": \"166\", \"Content-Type\": \"application/json\"}, \"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3Ta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CYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp4iNf7ouzpHkC4WyfbyzycJYLw38mfIrr5Ijdte/24\\\\nTKN+clhFgnNHA//C/n7ZmS91bkXfFWG8sYD4j1i0qDzVMKOT673ksDAXSMc2pupr\\\\nwi5F79T/5JnxAhWsIgFoaPIxYfL9NMnPFuqnWHNZfYXn1dRWr9GiArGzTQARAQAB\\\\ntHxBdXRvZ2VuZXJhd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\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg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CMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMSBHTVQifX0.DqYB4Q.gZRj3stxg_oPAqFYMJhffTcu8hM; HttpOnly; Path=/\", \"Content-Length\": \"1040\", \"Date\": \"Mon, 15 Oct 2018 10:48:01 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\"}+3": "{\"headers\": {\"Content-Length\": \"469\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMiBHTVQifX0.DqYB4g.NvIYBZdgnQqn9Kwtqxum-6miRaQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:02 GMT\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n}\\n\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/rofl-missing/submissions\"}+2": "{\"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\", \"status\": 404, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:48:06 GMT\", \"Content-Length\": \"166\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowNiBHTVQifX0.DqYB5g.btHtkB969m2bV8nZJS_h8VGkiTk; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file diff --git a/data/test_reply_source.json b/data/test_reply_source.json index 33f32bc29..305d66486 100644 --- a/data/test_reply_source.json +++ b/data/test_reply_source.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4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J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Content-Length\": \"2629\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNCBHTVQifX0.DqEaqA.F81DnYh6XWL90sT4uI6iuLYIpYU; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:24 GMT\"}, \"version\": \"0.1.1\"}", "{\"body\": \"{\\\"reply\\\": \\\"-----BEGIN PGP MESSAGE-----\\\\n\\\\nhQIMA/uCql0ybaddAQ//dg2iojyiyXBaUzKbPaL9+FlEEvraxXO+BbhcsbEdLI5E\\\\nKYxP5xb1LEOdaJjUcQaPjSARPnFbLzq3vsafZCBrEHtMWnSWxEpxbI1/DO+/Wbk1\\\\nT+ZVltaAdOIulfuMlIlL4rVCbprg+QUQbsbtIIOFdXpvuS1kQdv+F/sfYsFQanQw\\\\nV6u/yz3hgyymUyoBfZOXUfpFQ/t759s3rt3OGvwTzOx6o8Q3X+cKypwYsGsHzAUr\\\\n/N2Ggy6hYVzDj1czjtgUF2EWyKKfTN2RO9y+E0PYnu7C6QN41dx4yPsXFq16kOWC\\\\nLDyeXW2A/3/fGqp9176V4DRHMkUB6WkkXnekJBiyar1rG7WJ09KNdXGKJw6tjlqT\\\\nz4mnjgkZopSbuwJJgs+RZFddpGU31PSQg3ODWZRmSQbL/7lFtsJCY0yFjGoEdJFw\\\\npg5nJ6uOQN6bWPdM47nEPweFgNBIPmQccm0ayewaxvpIgTH+okBlLMPxnDg51vaA\\\\nF7dzZP4SdNQuBkHKq3DW7tu21+haa5YcjY5vJry9o5Fu9qJJadiI8Cg0JJqTVsUs\\\\n7Vu4eK1F9popI5hzdRBvBIdNB4LlIJiYmMKxD7l5yyOXSdoyINPU04PwxM3yO6QH\\\\n5Uw7gVNYCvgKSHAvfFnYAjPSd1m7CPW/aI2EjIHMBf+8FEyyWdHduPCMHZhUZ5XS\\\\nVAFdU++LS7PKxIFsXKtkHSMmO+GRfI/+SrVmGfw1YJbSmhaRAPk5ChqS7RQMgz/j\\\\nt+mAINV0vHUNAJkMW/QZXgdVw+eca0ITs/1u3fKsBlmQNv4Efg==\\\\n=686S\\\\n-----END PGP MESSAGE-----\\\\n\\\\n\\\"}\", \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\"}+2": "{\"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Your reply has been stored\\\"\\n}\\n\", \"status\": 201, \"headers\": {\"Content-Length\": \"46\", \"Vary\": \"Cookie\", \"Date\": \"Thu, 11 Oct 2018 17:32:25 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNSBHTVQifX0.DqEaqQ.jPU2jPpllUP6g6aqkwKg8TLGuIo; HttpOnly; Path=/\"}}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73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LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwBcDgAiQhicki\\\\n+tTjDBfAP0lT8Xa8zF5bMMp4iNf7ouzpHkC4WyfbyzycJYLw38mfIrr5Ijdte/24\\\\nTKN+clhFgnNHA//C/n7ZmS91bkXfFWG8sYD4j1i0qDzVMKOT673ksDAXSMc2pupr\\\\nwi5F79T/5JnxAhWsIgFoaPIxYfL9NMnPFuqnWHNZfYXn1dRWr9GiArGzTQARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8M04zQVVIWVhWSFVGR0E2QzJUV0tZVDQ1QUVH\\\\nWFBVUUxTTjY2SjI1RlgyN0tOQktPSVRDNkhMQllRWTRKN0JMVjNENU41QUVCRkxO\\\\nQVZVNU1UTzdFWkJOSldMRVNJSUYyTUZOT1VNQT0+iQI/BBMBCgApBQJbxG6fAhsv\\\\nBQkB4UYhBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQn6EGbC8pRwXMYw//\\\\nfHo/CLGbpyaUGDh6jCU6ZtstCuWwjiyG4gawCS/f5WTShmcamGDN0L3QVzFK10cq\\\\nDpnJ1bb53bG9lqTdUapru6YEYV/F+snRGxUXAqBPFo7zr3qyiJL+UmftNKZiQN26\\\\nb8bvf4vvhHOMlj4Z46wxuBBZlDfJSa+geXeObxLOkhnwpFCBxIf6qErIliwCcIGj\\\\ntrHSJcChPthaKzfE2iZaQyIWaVQ4i5N9aJ61yhFyz/zBulCVBhr++5QVki8rav0+\\\\nrzxDQADly6vWPctiHh4giMfeZq1yOXfV5D62w6WhM0hmpQwikuxu9CkSEmcKbtjS\\\\nh/2BgfZGUMwyX90cJfFgKSB7mWYyxiMQLLehtVH7utMY8tmvBHQCMmwmm06XLLYa\\\\nuRDnh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIW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FrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMSBHTVQifX0.DqYB4Q.gZRj3stxg_oPAqFYMJhffTcu8hM; HttpOnly; Path=/\", \"Content-Length\": \"1040\", \"Date\": \"Mon, 15 Oct 2018 10:48:01 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\"}+3": "{\"headers\": {\"Content-Length\": \"469\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMiBHTVQifX0.DqYB4g.NvIYBZdgnQqn9Kwtqxum-6miRaQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:02 GMT\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n}\\n\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/rofl-missing/submissions\"}+2": "{\"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\", \"status\": 404, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:48:06 GMT\", \"Content-Length\": \"166\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowNiBHTVQifX0.DqYB5g.btHtkB969m2bV8nZJS_h8VGkiTk; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}", "{\"body\": \"{\\\"reply\\\": \\\"-----BEGIN PGP MESSAGE-----\\\\n\\\\nhQIMA/uCql0ybaddAQ//dg2iojyiyXBaUzKbPaL9+FlEEvraxXO+BbhcsbEdLI5E\\\\nKYxP5xb1LEOdaJjUcQaPjSARPnFbLzq3vsafZCBrEHtMWnSWxEpxbI1/DO+/Wbk1\\\\nT+ZVltaAdOIulfuMlIlL4rVCbprg+QUQbsbtIIOFdXpvuS1kQdv+F/sfYsFQanQw\\\\nV6u/yz3hgyymUyoBfZOXUfpFQ/t759s3rt3OGvwTzOx6o8Q3X+cKypwYsGsHzAUr\\\\n/N2Ggy6hYVzDj1czjtgUF2EWyKKfTN2RO9y+E0PYnu7C6QN41dx4yPsXFq16kOWC\\\\nLDyeXW2A/3/fGqp9176V4DRHMkUB6WkkXnekJBiyar1rG7WJ09KNdXGKJw6tjlqT\\\\nz4mnjgkZopSbuwJJgs+RZFddpGU31PSQg3ODWZRmSQbL/7lFtsJCY0yFjGoEdJFw\\\\npg5nJ6uOQN6bWPdM47nEPweFgNBIPmQccm0ayewaxvpIgTH+okBlLMPxnDg51vaA\\\\nF7dzZP4SdNQuBkHKq3DW7tu21+haa5YcjY5vJry9o5Fu9qJJadiI8Cg0JJqTVsUs\\\\n7Vu4eK1F9popI5hzdRBvBIdNB4LlIJiYmMKxD7l5yyOXSdoyINPU04PwxM3yO6QH\\\\n5Uw7gVNYCvgKSHAvfFnYAjPSd1m7CPW/aI2EjIHMBf+8FEyyWdHduPCMHZhUZ5XS\\\\nVAFdU++LS7PKxIFsXKtkHSMmO+GRfI/+SrVmGfw1YJbSmhaRAPk5ChqS7RQMgz/j\\\\nt+mAINV0vHUNAJkMW/QZXgdVw+eca0ITs/1u3fKsBlmQNv4Efg==\\\\n=686S\\\\n-----END PGP MESSAGE-----\\\\n\\\\n\\\"}\", \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\"}+2": "{\"status\": 201, \"body\": \"{\\n \\\"message\\\": \\\"Your reply has been stored\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"46\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:08 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowOCBHTVQifX0.DqYB6A.atUC9gjGCTAEbe8mPEAQcsCDWvU; HttpOnly; Path=/\"}}"} \ No newline at end of file diff --git a/data/test_star_add_remove.json b/data/test_star_add_remove.json index 2d5ade1b4..e83c9cabe 100644 --- a/data/test_star_add_remove.json +++ b/data/test_star_add_remove.json @@ -1 +1 @@ -{"{\"body\": \"{\\\"passphrase\\\": \\\"correct horse battery staple profanity oil chewy\\\", \\\"username\\\": \\\"journalist\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/token\"}+1": "{\"body\": \"{\\n \\\"expiration\\\": \\\"2018-10-12T01:31:53.881796Z\\\", \\n \\\"token\\\": \\\"eyJhbGciOiJIUzI1NiIsImV4cCI6MTUzOTMwNzkxMywiaWF0IjoxNTM5Mjc5MTEzfQ.eyJpZCI6MX0.gRY8i16_GEsZ1V3m8r0IfdTHeuAwOZBoGJHXdmqBOhs\\\"\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\", \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:31:53 GMT\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Content-Length\": \"188\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMTo1MyBHTVQifX0.DqEaiQ.bpOuYIJ_k59fexW1WNZIw7UXQpA; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"status\": 200, \"headers\": {\"Date\": \"Thu, 11 Oct 2018 17:32:25 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNSBHTVQifX0.DqEaqQ.jPU2jPpllUP6g6aqkwKg8TLGuIo; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 5, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1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2gTLSRE3RFENTK8D8cIMM9sL176nVBfJzX7KC5NLpFXhwZBXv9CwWeQHSOibx\\\\nwXDIQrJFt/L2VIln+y9W7xdUhkGpl6IWAYOpqezH0q3optf321G7YbZOhHDwyWiY\\\\nq34p0EKYiw/e8ERIkv6DKC+1z3KRLTRVhqrEAhTq676PisA5brLq2Q9GCYyWbYLq\\\\n6oi34VJDZLhBMwDT0TRYIaS3GUMRfan+lKn5i766z83rps7WW2YjX5gYLS/F8t7X\\\\nvsdOE45VS5GMBglQogdbjVE8zIAkXJX+ii5NqbbUG8E8qxCNLRMl789ot21UeVOY\\\\nfHftzPqFduyqTpEK1/JF5CiGCvuq66r79IdwTUEmclr/GiHMCAY7pHuTY+IgJBvr\\\\nCFtWjwcoJ5hYjvi5XDnX0+rt2iREgFeIVjUsXDiOAb7K2XA47wv46VsHLm/4dELG\\\\nNtsXR7J7q0U0fG3Fpa4iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\", \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\"}+2": "{\"status\": 201, \"body\": \"{\\n \\\"message\\\": \\\"Star added\\\"\\n}\\n\", \"headers\": {\"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:26 GMT\", \"Content-Length\": \"30\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNiBHTVQifX0.DqEaqg.a8ZrYgMZ_USIr99OziFFHfiNKc8; HttpOnly; Path=/\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"delete\", \"path_query\": \"api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\"}+3": "{\"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNyBHTVQifX0.DqEaqw.RQiJ1vTnVKZX1rR1P8m8knwF_TQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Date\": \"Thu, 11 Oct 2018 17:32:27 GMT\", \"Content-Length\": \"32\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\"}, \"version\": \"0.1.1\", \"status\": 200, \"body\": \"{\\n \\\"message\\\": \\\"Star removed\\\"\\n}\\n\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+4": "{\"version\": \"0.1.1\", \"status\": 200, \"headers\": {\"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiVGh1LCAxMSBPY3QgMjAxOCAxOTozMjoyNyBHTVQifX0.DqEaqw.RQiJ1vTnVKZX1rR1P8m8knwF_TQ; HttpOnly; Path=/\", \"Date\": \"Thu, 11 Oct 2018 17:32:27 GMT\", \"Content-Type\": \"application/json\", \"Content-Length\": \"2629\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/add_star\\\", \\n \\\"interaction_count\\\": 5, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"rose-colored rifle\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFu/iPUBEADSGJ1/BHpEotu6eWh1M8MwAtzhR6CGenjdLBtbXTpAySH/ds5q\\\\nKAKnrwW917/mhGjBXgaqFngfldCJ2/n7XOQAEID0BjzO4QAdbFguwS3gC06A1jtk\\\\nsmn4yRDAXUoyRfneqqJb3hK5EzwuZyw6zvr8eoUZ/s3bxVGqXhwySg7BBs7DB6O4\\\\ng893ApDY5sfYL66hio9mlQ6W8sZQks7gkBqcrs43cUZnnzPBK2Edb64h1x8Zsq+a\\\\n2QS1sSAsC5C4cZJ2VKZYW8rTBWBJ+YMdjuAfi7vE8fuqlaG9VAXi4TKiJrIH7XDg\\\\nWSy0WaZJ+7SoOUkFIWFDXX5nNZXz9BOzQvqPjqCQrFj72F+vxJCT85Sv3V5crhOt\\\\n0TfpKnJBUC//m5/GYttZ6UqDujzFNccEzSS4Y//mPAg0j90SITSsyPc/XvwSupxe\\\\nBZ5myCAogYmgH35ugkJEc4rqGCzjYtCawMCKJ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iodzKD6OoQxbYAnXv4/2/oJJ38MhRHttixq+T+637WnHd\\\\nT/8lcVVNmf9s9+FA4AtvBwKpQr7BvIj5BVyCo9BKI/4KAtJBCC/d6tcoMpzbrZLj\\\\nmsk6ROcb1G4qW2/HlbHBUOYkIXRxAW54vwr7iZuRhOA=\\\\n=a8Z1\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-11T17:31:36.569138Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/b707f8b6-12dd-4e72-a661-0343d60a5961\\\", \\n \\\"uuid\\\": \\\"b707f8b6-12dd-4e72-a661-0343d60a5961\\\"\\n }\\n ]\\n}\\n\"}"} \ No newline at end of file +{"{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+1": "{\"headers\": {\"Content-Length\": \"5240\", \"Date\": \"Mon, 15 Oct 2018 10:46:58 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OCBHTVQifX0.DqYBog.fYCzbmIRuA6u65naeoL3F6rUSoc; HttpOnly; Path=/\"}, \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9JK8ini+Wce2EQt7+\\\\nBltumD5vEsZGcpTaKTLsQ9RWvtvg0A5Viv7q+/eLyvMFRzNF1Tp3EsI84QARAQAB\\\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8UDNIWTRTMkhPQkVGR1M0R0JTTExURkNNTFFL\\\\nU0lMR1g2NVlDRk42NlFVWVdSS1RIUFJOV1hWRjNFUU9XSkFFRFJZQlQ3QVlLQ1VX\\\\nWU1aSVFES0FHWVZZUEZMSU1NSlhOVFROUU9NQT0+iQI/BBMBCgApBQJbxG6cAhsv\\\\nBQkB4UYkBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQ7lj3fkt9c+iMDRAA\\\\njjLrabgn2e2012+n5eIUus6cdHFQDM5R4TO6O6i6h7nvBGIA61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7Dhf365roh2crDL2SfXqGE3gYhZr9z/QdgY8BfKzhpQXpmh\\\\njmQPFxUXgJFh+xWqb/trY0tI/86WdDSS06o8U5qiYih3m0vrHSyi3S0m87P/Ce4V\\\\nOjnw6Nna5RCOynUquzK0vJx2m1dUbDsMSg810II49N10QIR/U8UwB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iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"status\": 200, \"version\": \"0.1.1\"}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnic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A61j6tkKirG+8a/kT\\\\neCYdXu/nAgNbglkF0Gsg36KvipkQ7N003Cp9r0rofbA2ERSmT/SkCiMCDECGidx+\\\\n3YnCvEj5Xq+mqooKeyA3sRJe/TS/p0/RoY6hbXZhjcjnKfZL8030rL/wahQSdRXi\\\\nsEo2DdWum0E4ptqDZOv1E9Ek1xTL6sJ4hs83N1LI2TX5wcS58+y7di0KDTlxCFRn\\\\nd6Z5YQZWbssoHCMJt8J9kLg9vWfJSCERpuD/RDgCP5F2FwlC231aA2zrQBzU5kZt\\\\nUwElnIDI1WnZTXBz9y3FBpblohqr33XVsHZKl0yMbrT5JJPCZe30kZMz91p+mKZM\\\\nRV0C2gSKpylsUeGocaS5p0kf5QMTwDOlZoHJDRqYJVr0Uvcu8JMBFrNHVOU1iCPY\\\\nOTohSpG0VPGoNL7gog7npbbscZ8gWZiqykpGdyyL6N1I7JX0M49clt9RZHLbsMzA\\\\niOsEUF36WiPBzrchgwWPs+TEIQSQ2HU8MXWybEDdExmYbZZTMj6tk/wCn7RbvK2f\\\\nOYO13pLTM4fuQIPn8CYyRtvoXMeJCxQiHn/qy6rRcdLDPwRac4p/lFKI8SRVxoUs\\\\nrmKFON9P6wN3ooXv9kG5rc8ewLxYrkgidzrD/GOVpcM=\\\\n=MPWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n}\\n\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0Njo1OSBHTVQifX0.DqYBow.94-bnoWUIk3LjjHM9jBQJ7z6eFg; HttpOnly; Path=/\", \"Date\": \"Mon, 15 Oct 2018 10:46:59 GMT\", \"Vary\": \"Cookie\", \"Content-Length\": \"2531\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\"}+2": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"submissions\\\": [\\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n }, \\n {\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b/download\\\", \\n \\\"filename\\\": \\\"2-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": false, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\", \\n \\\"uuid\\\": \\\"98a79db7-2f34-4d08-ae00-6b4ab8a31b1b\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMSBHTVQifX0.DqYB4Q.gZRj3stxg_oPAqFYMJhffTcu8hM; HttpOnly; Path=/\", \"Content-Length\": \"1040\", \"Date\": \"Mon, 15 Oct 2018 10:48:01 GMT\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\"}+3": "{\"headers\": {\"Content-Length\": \"469\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowMiBHTVQifX0.DqYB4g.NvIYBZdgnQqn9Kwtqxum-6miRaQ; HttpOnly; Path=/\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:02 GMT\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"download_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d/download\\\", \\n \\\"filename\\\": \\\"1-starry-eyed_shaping-msg.gpg\\\", \\n \\\"is_read\\\": true, \\n \\\"size\\\": 604, \\n \\\"source_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"submission_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions/1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\", \\n \\\"uuid\\\": \\\"1961c82d-466f-40c6-a7f6-7251f3dfbb7d\\\"\\n}\\n\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources/rofl-missing/submissions\"}+2": "{\"body\": \"{\\n \\\"error\\\": \\\"Not Found\\\", \\n \\\"message\\\": \\\"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\\\"\\n}\\n\", \"status\": 404, \"version\": \"0.1.1\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:48:06 GMT\", \"Content-Length\": \"166\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowNiBHTVQifX0.DqYB5g.btHtkB969m2bV8nZJS_h8VGkiTk; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}", "{\"body\": \"{\\\"reply\\\": \\\"-----BEGIN PGP MESSAGE-----\\\\n\\\\nhQIMA/uCql0ybaddAQ//dg2iojyiyXBaUzKbPaL9+FlEEvraxXO+BbhcsbEdLI5E\\\\nKYxP5xb1LEOdaJjUcQaPjSARPnFbLzq3vsafZCBrEHtMWnSWxEpxbI1/DO+/Wbk1\\\\nT+ZVltaAdOIulfuMlIlL4rVCbprg+QUQbsbtIIOFdXpvuS1kQdv+F/sfYsFQanQw\\\\nV6u/yz3hgyymUyoBfZOXUfpFQ/t759s3rt3OGvwTzOx6o8Q3X+cKypwYsGsHzAUr\\\\n/N2Ggy6hYVzDj1czjtgUF2EWyKKfTN2RO9y+E0PYnu7C6QN41dx4yPsXFq16kOWC\\\\nLDyeXW2A/3/fGqp9176V4DRHMkUB6WkkXnekJBiyar1rG7WJ09KNdXGKJw6tjlqT\\\\nz4mnjgkZopSbuwJJgs+RZFddpGU31PSQg3ODWZRmSQbL/7lFtsJCY0yFjGoEdJFw\\\\npg5nJ6uOQN6bWPdM47nEPweFgNBIPmQccm0ayewaxvpIgTH+okBlLMPxnDg51vaA\\\\nF7dzZP4SdNQuBkHKq3DW7tu21+haa5YcjY5vJry9o5Fu9qJJadiI8Cg0JJqTVsUs\\\\n7Vu4eK1F9popI5hzdRBvBIdNB4LlIJiYmMKxD7l5yyOXSdoyINPU04PwxM3yO6QH\\\\n5Uw7gVNYCvgKSHAvfFnYAjPSd1m7CPW/aI2EjIHMBf+8FEyyWdHduPCMHZhUZ5XS\\\\nVAFdU++LS7PKxIFsXKtkHSMmO+GRfI/+SrVmGfw1YJbSmhaRAPk5ChqS7RQMgz/j\\\\nt+mAINV0vHUNAJkMW/QZXgdVw+eca0ITs/1u3fKsBlmQNv4Efg==\\\\n=686S\\\\n-----END PGP MESSAGE-----\\\\n\\\\n\\\"}\", \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\"}+2": "{\"status\": 201, \"body\": \"{\\n \\\"message\\\": \\\"Your reply has been stored\\\"\\n}\\n\", \"version\": \"0.1.1\", \"headers\": {\"Content-Length\": \"46\", \"Content-Type\": \"application/json\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:08 GMT\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowOCBHTVQifX0.DqYB6A.atUC9gjGCTAEbe8mPEAQcsCDWvU; HttpOnly; Path=/\"}}", "{\"body\": null, \"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"POST\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\"}+2": "{\"body\": \"{\\n \\\"message\\\": \\\"Star added\\\"\\n}\\n\", \"status\": 201, \"version\": \"0.1.1\", \"headers\": {\"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODowOSBHTVQifX0.DqYB6Q.0UMdHuVZ4MNd4q0uPqO5wh47YRs; HttpOnly; Path=/\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:09 GMT\", \"Vary\": \"Cookie\", \"Content-Type\": \"application/json\", \"Content-Length\": \"30\"}}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"DELETE\", \"path_query\": \"api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\"}+3": "{\"headers\": {\"Content-Type\": \"application/json\", \"Content-Length\": \"32\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODoxMCBHTVQifX0.DqYB6g.GJUBWnr-jXRbJWsmFA5Ww-oMXXg; HttpOnly; Path=/\", \"Vary\": \"Cookie\", \"Date\": \"Mon, 15 Oct 2018 10:48:10 GMT\", \"Server\": \"Werkzeug/0.14.1 Python/2.7.6\"}, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"message\\\": \\\"Star removed\\\"\\n}\\n\", \"status\": 200}", "{\"headers\": \"{\\\"Accept\\\": \\\"application/json\\\", \\\"Content-Type\\\": \\\"application/json\\\"}\", \"method\": \"GET\", \"path_query\": \"api/v1/sources\"}+4": "{\"status\": 200, \"version\": \"0.1.1\", \"body\": \"{\\n \\\"sources\\\": [\\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/add_star\\\", \\n \\\"interaction_count\\\": 5, \\n \\\"is_flagged\\\": true, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"starry-eyed shaping\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbpwBEADBnicdUU5S1cy/omybzgInOXu3TaAcw3eIuvPVZMrgSqDOsW3w\\\\nXzu/zwZ4npnXT9mDkR7wGDVzMlbfPST393/53OeFVTwQWBhdeoWSA+XGAA4HQWKt\\\\nfe2oCJCyA/5p3384iTSjWOYvCkjVZNHFLwlf4MwJ1gYpjx70sP+p+sofzwbOLjD0\\\\nVk0ipa6F73DA8nuCpNKz422BhMy+b8/T7xrKRtuiH58ibdFYE5cIsFg905ohP+Aq\\\\nCu2R2hqIA7dEPJ4Ij8AMh6UsAg00H6i6bB9phOwqGMw5An+akK+z6iYKghsnWpR1\\\\nimtSJ0fMEMg9JmlXvvznZOsv9KT4zviD+slxuUBknLcqhhDOxf4uWI5xvCsnTlJq\\\\ngVw9qtvQQH+6Dly/XuBvUIWbeCzmWrnG/fIk2APsCrl0t3bQgv6Iw4a1pUwILByF\\\\nQSeS1xSiCzzM8ADLuiWzjFaAQgQgA7KkFi+D7Cg3EPur1pLC60BhwXDrlJQ/yyzb\\\\n4D9iRZOdrUxrEtUCtyLimFuCixsT2XcD1TYdcM4mB1h6yUpEzyfIEgQ+OW5Ec4NO\\\\nErJ7U6X+2kpH/E6u5szD2ZSVuQPBjY2riDpzJkAC1C7s0dU9JK8ini+Wce2EQt7+\\\\nBltumD5vEsZGcp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PWa\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:29.248380Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\", \\n \\\"uuid\\\": \\\"5f891a3a-0b2a-40b7-9c9a-49c4ca7252b2\\\"\\n }, \\n {\\n \\\"add_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/add_star\\\", \\n \\\"interaction_count\\\": 4, \\n \\\"is_flagged\\\": false, \\n \\\"is_starred\\\": false, \\n \\\"journalist_designation\\\": \\\"datable syncopation\\\", \\n \\\"key\\\": {\\n \\\"public\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\n\\\\nmQINBFvEbp8BEADLk6fQ9ZYVCV1nzEB62akW3uK3ry/fVx37XHjJkP1ouqZOS4+X\\\\nyLy/TsHZEiP+NnWTAsMlkVlYxnO6KfsaEe/HMEXHddMV0B2Z5VMqmyPjotPXc/k3\\\\nzPe5HToQl917pPCbZE3uuHhJodqKwaieFhj2DoLouP8PAGDsJVu/9fxfEYHrPQgD\\\\ncwDVtj3gzM6iulIGgDVIIIAqI8CJl9qJTrqTVu34rBKwctSd+IEhWzmCZD02xt7a\\\\nTain0KHle+WACz0rdRf4uhkczufh9Q7TzSq1h0omZDZQq5CKVJQZg12Rka8hMs1w\\\\ney3/ZpQQMOnYAoWAj7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nh/NKIfGsYaAdoH5DoQohZeEpOk8jj047zZ4yJYLQFSF1Couo/wSYp2gzGQR1\\\\nb4ZtplZorLWHN3YeQqx8UkR1+Cy6DKUUFWCku4HnSLoMQldnrgEhySz1e2r5P7gl\\\\nKnta++yC3j82AFonKYzagauLGjuGWb126pC4+iMaQIRq/QH5C5FE8s3g99sv7oIe\\\\nySMOLY+rZwsTyTxHw6knPNErEd80QUpH1vUt1x3SjnW+l9Lvqll5I7dU6WuM1Ufs\\\\n3QgpNC6OHYMzlW9adGmyVBCW2erWALJnpJBaA+R4+8Y=\\\\n=5bhM\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\", \\n \\\"type\\\": \\\"PGP\\\"\\n }, \\n \\\"last_updated\\\": \\\"2018-10-15T10:40:37.601298Z\\\", \\n \\\"number_of_documents\\\": 0, \\n \\\"number_of_messages\\\": 2, \\n \\\"remove_star_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/remove_star\\\", \\n \\\"replies_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/replies\\\", \\n \\\"submissions_url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd/submissions\\\", \\n \\\"url\\\": \\\"/api/v1/sources/e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\", \\n \\\"uuid\\\": \\\"e94ad028-52d4-4b48-bd8a-61e886aac9dd\\\"\\n }\\n ]\\n}\\n\", \"headers\": {\"Server\": \"Werkzeug/0.14.1 Python/2.7.6\", \"Date\": \"Mon, 15 Oct 2018 10:48:11 GMT\", \"Content-Length\": \"5240\", \"Vary\": \"Cookie\", \"Set-Cookie\": \"js=eyJleHBpcmVzIjp7IiBkIjoiTW9uLCAxNSBPY3QgMjAxOCAxMjo0ODoxMSBHTVQifX0.DqYB6w.GxCan9EsD8IljXM3eXTm34vS_2c; HttpOnly; Path=/\", \"Content-Type\": \"application/json\"}}"} \ No newline at end of file diff --git a/sdclientapi/__init__.py b/sdclientapi/__init__.py index 411877a33..23fe1c326 100644 --- a/sdclientapi/__init__.py +++ b/sdclientapi/__init__.py @@ -65,24 +65,28 @@ def __init__(self, address, username, passphrase, totp, proxy=False) -> None: def _send_json_request(self, method, path_query, body=None, headers=None): if self.proxy: # We are using the Qubes securedrop-proxy if method == "POST": - data = {"method": method, "path_query": path_query, "body": body, "headers": headers} + data = {"method": method, "path_query": path_query, "body": body} + if headers: + data["headers"] = headers elif method == "GET" or method == "DELETE": data = {"method": method, "path_query": path_query, "headers": headers} - result = json.loads(json_query(json.dumps(data, sort_keys=True))) - return json.loads(result["body"]), result["status"] + data_str = json.dumps(data, sort_keys=True) + result = json.loads(json_query(data_str)) + return json.loads(result["body"]), result["status"], result["headers"] else: # We are not using the Qubes securedrop-proxy if method == "POST": - result = requests.post(self.server + path_query, - data=body) + result = requests.post(self.server + path_query, data=body) elif method == "GET": - result = requests.get(self.server + path_query, - headers=headers) + result = requests.get(self.server + path_query, headers=headers) elif method == "DELETE": result = requests.delete(self.server + path_query, headers=headers) - return result.json(), result.status_code + # Because when we download a file there is no JSON in the body + if path_query.find("/download") != -1: + return result, result.status_code, result.headers + return result.json(), result.status_code, result.headers def authenticate(self, totp="") -> bool: """ @@ -103,7 +107,9 @@ def authenticate(self, totp="") -> bool: body = json.dumps(user_data) try: - token_data, status_code = self._send_json_request(method, path_query, body=body) + token_data, status_code, headers = self._send_json_request( + method, path_query, body=body + ) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") if not "expiration" in token_data: @@ -130,8 +136,9 @@ def get_sources(self) -> List[Source]: method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -158,8 +165,9 @@ def get_source(self, source: Source) -> Source: method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) @@ -195,8 +203,9 @@ def delete_source(self, source: Source) -> bool: method = "DELETE" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) @@ -236,8 +245,9 @@ def add_star(self, source: Source) -> bool: method = "POST" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) except json.decoder.JSONDecodeError: @@ -258,8 +268,9 @@ def remove_star(self, source: Source) -> bool: method = "DELETE" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) except json.decoder.JSONDecodeError: @@ -281,8 +292,9 @@ def get_submissions(self, source: Source) -> List[Submission]: method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing submission {}".format(source.uuid)) @@ -309,15 +321,15 @@ def get_submission(self, submission: Submission) -> Submission: :param submission: Submission object we want to update. :returns: Updated submission object from the server. """ - source_uuid = submission.source_url.split("/")[-1] path_query = "api/v1/sources/{}/submissions/{}".format( - source_uuid, submission.uuid + submission.source_uuid, submission.uuid ) method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing submission {}".format(submission.uuid)) @@ -339,7 +351,7 @@ def get_submission_from_string(self, uuid: str, source_uuid: str) -> Submission: :returns: Updated submission object from the server. """ s = Submission(uuid=uuid) - s.source_url = "/api/v1/sources/{}".format(source_uuid) + s.source_uuid = source_uuid return self.get_submission(s) def get_all_submissions(self) -> List[Submission]: @@ -352,8 +364,9 @@ def get_all_submissions(self) -> List[Submission]: method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -379,15 +392,15 @@ def delete_submission(self, submission: Submission) -> bool: # Not using direct URL because this helps to use the same method # from local submission (not fetched from server) objects. # See the *from_string for an example. - source_uuid = submission.source_url.split("/")[-1] path_query = "api/v1/sources/{}/submissions/{}".format( - source_uuid, submission.uuid + submission.source_uuid, submission.uuid ) method = "DELETE" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing submission {}".format(submission.uuid)) @@ -415,7 +428,9 @@ def delete_submission_from_string(self, uuid: str, source_uuid: str) -> bool: s.source_url = "/api/v1/sources/{}".format(source_uuid) return self.delete_submission(s) - def download_submission(self, submission: Submission, path: str) -> Tuple[str, str]: + def download_submission( + self, submission: Submission, path: str = "" + ) -> Tuple[str, str]: """ Returns a tuple of sha256sum and file path for a given Submission object. This method also requires a directory path in where it will save the submission file. @@ -425,30 +440,41 @@ def download_submission(self, submission: Submission, path: str) -> Tuple[str, s :returns: Tuple of sha256sum and path of the saved submission. """ - url = self.server.rstrip("/") + submission.download_url + path_query = "api/v1/sources/{}/submissions/{}/download".format( + submission.source_uuid, submission.uuid + ) + method = "GET" - if os.path.exists(path) and not os.path.isdir(path): - raise BaseError("Please provide a vaild directory to save.") + if path: + if os.path.exists(path) and not os.path.isdir(path): + raise BaseError("Please provide a vaild directory to save.") try: - res = requests.get(url, headers=self.auth_header, stream=True) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) - if res.status_code == 404: - raise WrongUUIDError("Missing submission {}".format(submission.uuid)) + if status_code == 404: + raise WrongUUIDError("Missing reply {}".format(submission.uuid)) # Get the headers - headers = res.headers + headers = headers etag = headers["Etag"] - # This is where we will save our downloaded file - filepath = os.path.join(path, submission.filename) - with open(filepath, "wb") as fobj: - for chunk in res.iter_content( - chunk_size=1024 - ): # Getting 1024 in each chunk - if chunk: - fobj.write(chunk) - + if not self.proxy: + # This is where we will save our downloaded file + filepath = os.path.join(path, submission.filename) + with open(filepath, "wb") as fobj: + for chunk in data.iter_content( + chunk_size=1024 + ): # Getting 1024 in each chunk + if chunk: + fobj.write(chunk) + + else: + filepath = os.path.join( + "/home/user/QubesIncoming/", proxyvmname, data["filename"] + ) # Because etag comes as JSON encoded string etag = json.loads(etag) # Return the tuple of sha256sum, filepath @@ -467,8 +493,9 @@ def flag_source(self, source: Source) -> bool: method = "POST" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) @@ -497,8 +524,9 @@ def get_current_user(self): method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -521,12 +549,12 @@ def reply_source(self, source: Source, msg: str) -> bool: reply = {"reply": msg} try: - data, status_code = self._send_json_request(method, path_query, - body=json.dumps(reply), - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, body=json.dumps(reply), headers=self.auth_header + ) if status_code == 400: - raise ReplyError(res.json()["message"]) + raise ReplyError(data["message"]) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -550,8 +578,9 @@ def get_replies_from_source(self, source: Source) -> List[Reply]: method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) @@ -581,8 +610,9 @@ def get_reply_from_source(self, source: Source, reply_uuid: str) -> Reply: method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) if status_code == 404: raise WrongUUIDError("Missing source {}".format(source.uuid)) @@ -603,18 +633,13 @@ def get_all_replies(self) -> List[Reply]: :returns: List of Reply objects. """ - source_uuid = submission.source_url.split("/")[-1] - path_query = "/api/v1/sources/{}/submissions/{}/download".format( - source_uuid, submission.uuid - ) + path_query = "api/v1/replies" method = "GET" try: - data, status_code = self._send_json_request(method, path_query, - headers=self.auth_header) - - if status_code == 404: - raise WrongUUIDError("Missing source {}".format(source.uuid)) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") @@ -629,7 +654,7 @@ def get_all_replies(self) -> List[Reply]: return result - def download_reply(self, reply: Reply, path: str) -> Tuple[str, str]: + def download_reply(self, reply: Reply, path: str = "") -> Tuple[str, str]: """ Returns a tuple of sha256sum and file path for a given Reply object. This method also requires a directory path in where it will save the reply file. @@ -639,30 +664,42 @@ def download_reply(self, reply: Reply, path: str) -> Tuple[str, str]: :returns: Tuple of sha256sum and path of the saved Reply. """ - url = self.server.rstrip("/") + reply.reply_url + "/download" + path_query = "api/v1/sources/{}/replies/{}/download".format( + reply.source_uuid, reply.uuid + ) + + method = "GET" - if os.path.exists(path) and not os.path.isdir(path): - raise BaseError("Please provide a valid directory to save.") + if path: + if os.path.exists(path) and not os.path.isdir(path): + raise BaseError("Please provide a valid directory to save.") try: - res = requests.get(url, headers=self.auth_header, stream=True) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing reply {}".format(reply.uuid)) # Get the headers - headers = res.headers + headers = headers etag = headers["Etag"] - # This is where we will save our downloaded file - filepath = os.path.join(path, reply.filename) - with open(filepath, "wb") as fobj: - for chunk in res.iter_content( - chunk_size=1024 - ): # Getting 1024 in each chunk - if chunk: - fobj.write(chunk) - + if not self.proxy: + # This is where we will save our downloaded file + filepath = os.path.join(path, reply.filename) + with open(filepath, "wb") as fobj: + for chunk in data.iter_content( + chunk_size=1024 + ): # Getting 1024 in each chunk + if chunk: + fobj.write(chunk) + + else: + filepath = os.path.join( + "/home/user/QubesIncoming/", proxyvmname, data["filename"] + ) # Because etag comes as JSON encoded string etag = json.loads(etag) # Return the tuple of sha256sum, filepath @@ -680,18 +717,19 @@ def delete_reply(self, reply: Reply) -> bool: # Not using direct URL because this helps to use the same method # from local reply (not fetched from server) objects. # See the *from_string for an example. - source_uuid = reply.source_url.split("/")[-1] - url = self.server.rstrip("/") + "/api/v1/sources/{}/replies/{}".format( - source_uuid, reply.uuid + path_query = "api/v1/sources/{}/replies/{}".format( + reply.source_uuid, reply.uuid ) + method = "DELETE" + try: - res = requests.delete(url, headers=self.auth_header) + data, status_code, headers = self._send_json_request( + method, path_query, headers=self.auth_header + ) - if res.status_code == 404: + if status_code == 404: raise WrongUUIDError("Missing reply {}".format(reply.uuid)) - - data = res.json() except json.decoder.JSONDecodeError: raise BaseError("Error in parsing JSON") diff --git a/tests/test_api.py b/tests/test_api.py index 6dbfc0d79..c3153bfd3 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -101,7 +101,7 @@ def test_get_submission_from_string(self): @vcr.use_cassette("data/test-get-wrong-submissions.yml") def test_get_wrong_submissions(self): s = self.api.get_sources()[0] - s.submissions_url = "/api/v1/sources/rofl-missing/submissions/2334" + s.uuid = "rofl-missing" with self.assertRaises(WrongUUIDError): self.api.get_submissions(s) From 6170a337914cb34da0286da0f0ed79c0657f46bd Mon Sep 17 00:00:00 2001 From: redshiftzero Date: Mon, 15 Oct 2018 16:10:00 -0700 Subject: [PATCH 14/14] Temporary fix to workaround server bug #3877 ETags are being stripped from staging/production servers due to an Apache misconfiguration. For now we should not use the ETag until this is addressed server-side. --- sdclientapi/__init__.py | 16 ++++++++-------- tests/test_api.py | 10 ++-------- tests/test_apiproxy.py | 4 ++-- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/sdclientapi/__init__.py b/sdclientapi/__init__.py index 23fe1c326..cd48afd80 100644 --- a/sdclientapi/__init__.py +++ b/sdclientapi/__init__.py @@ -459,7 +459,6 @@ def download_submission( # Get the headers headers = headers - etag = headers["Etag"] if not self.proxy: # This is where we will save our downloaded file @@ -475,10 +474,11 @@ def download_submission( filepath = os.path.join( "/home/user/QubesIncoming/", proxyvmname, data["filename"] ) - # Because etag comes as JSON encoded string - etag = json.loads(etag) # Return the tuple of sha256sum, filepath - return etag[7:], filepath + # Returning empty string instead of sha256sum due to this + # SecureDrop server bug: + # https://github.com/freedomofpress/securedrop/issues/3877 + return "", filepath except Exception as err: raise BaseError(err) @@ -684,7 +684,6 @@ def download_reply(self, reply: Reply, path: str = "") -> Tuple[str, str]: # Get the headers headers = headers - etag = headers["Etag"] if not self.proxy: # This is where we will save our downloaded file @@ -700,10 +699,11 @@ def download_reply(self, reply: Reply, path: str = "") -> Tuple[str, str]: filepath = os.path.join( "/home/user/QubesIncoming/", proxyvmname, data["filename"] ) - # Because etag comes as JSON encoded string - etag = json.loads(etag) # Return the tuple of sha256sum, filepath - return etag[7:], filepath + # Returning empty string instead of sha256sum due to this + # SecureDrop server bug: + # https://github.com/freedomofpress/securedrop/issues/3877 + return "", filepath except Exception as err: raise BaseError(err) diff --git a/tests/test_api.py b/tests/test_api.py index c3153bfd3..224f99bda 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -194,15 +194,12 @@ def test_download_submission(self): # We need a temporary directory to download tmpdir = tempfile.mkdtemp() - etag, filepath = self.api.download_submission(s, tmpdir) + _, filepath = self.api.download_submission(s, tmpdir) # now let us read the downloaded file with open(filepath, "rb") as fobj: data = fobj.read() - shasum = hashlib.sha256(data).hexdigest() - self.assertEqual(etag, shasum) - # Now the submission should have is_read as True. s = self.api.get_submission(s) @@ -241,15 +238,12 @@ def test_download_reply(self): # We need a temporary directory to download tmpdir = tempfile.mkdtemp() - etag, filepath = self.api.download_reply(r, tmpdir) + _, filepath = self.api.download_reply(r, tmpdir) # now let us read the downloaded file with open(filepath, "rb") as fobj: data = fobj.read() - shasum = hashlib.sha256(data).hexdigest() - self.assertEqual(etag, shasum) - # Let us remove the temporary directory shutil.rmtree(tmpdir) diff --git a/tests/test_apiproxy.py b/tests/test_apiproxy.py index b1be972bc..2faaeb88e 100644 --- a/tests/test_apiproxy.py +++ b/tests/test_apiproxy.py @@ -224,7 +224,7 @@ def test_delete_reply(self): def test_download_reply(self): r = self.api.get_all_replies()[0] - etag, filepath = self.api.download_reply(r) + _, filepath = self.api.download_reply(r) @dastollervey_datasaver def test_download_submission(self): @@ -232,7 +232,7 @@ def test_download_submission(self): self.assertFalse(s.is_read) - etag, filepath = self.api.download_submission(s) + _, filepath = self.api.download_submission(s) # Now the submission should have is_read as True. s = self.api.get_submission(s)