Permalink
Browse files

Fix failed tests

  • Loading branch information...
LRParser committed Jul 31, 2018
1 parent d37147a commit 47971991ac8bbf53b608d8cf27ca3ca0b169d78f
@@ -39,7 +39,7 @@ class LocalClient:
def __init__(self):
logger.info("Initialized local client")

def path_exists(self, path: str, client=None):
def path_exists(self, path: str):
return os.path.exists(path)

def put_buffer(self, file_path: str, buffer, write_bytes=True):
@@ -187,8 +187,7 @@ def create_filing_error(row, filing_path: str):

@shared_task
def process_filing_index(client_type: str, file_path: str, filing_index_buffer: Union[str, bytes] = None,
form_type_list: Iterable[str] = None, store_raw: bool = False, store_text: bool = False,
use_local: bool = False):
form_type_list: Iterable[str] = None, store_raw: bool = False, store_text: bool = False):
"""
Process a filing index from an S3 path or buffer.
:param file_path: S3 or local path to process; if filing_index_buffer is none, retrieved from here
@@ -22,11 +22,10 @@
SOFTWARE.
"""

import openedgar.clients.s3
from openedgar.clients.s3 import S3Client
import openedgar.tasks
from config.settings.base import S3_BUCKET


def test_process_filing():
"""
Test process_filing
@@ -36,5 +35,6 @@ def test_process_filing():
# Catch inside testing
return True
else:
buffer = openedgar.clients.s3.get_buffer("edgar/data/1000180/0000950134-05-005462.txt")
client = S3Client()
buffer = client.get_buffer("edgar/data/1000180/0000950134-05-005462.txt")
openedgar.tasks.process_filing(buffer)

0 comments on commit 4797199

Please sign in to comment.