Skip to content

Commit

Permalink
- Fixing import issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Kheiden committed Feb 1, 2020
1 parent 251af46 commit 840a6b1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion tests/optionstrader/test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_analyzer_example_stream(self):
self.assertTrue(option_chain_dict_array)


#@unittest.skip("skipping...")
@unittest.skip("skipping...")
def test_analyze_option_chain(self):
# This module take the stock's most recent price into account when
# performing the analysis.
Expand Down
2 changes: 1 addition & 1 deletion tests/optionstrader/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def tearDown(self):
pass

# ---------------------------------------- TESTING ----------------------------------------
#@unittest.skip("NOT YET PASSED.")
@unittest.skip("NOT YET PASSED.")
def test_add_option_chain_to_database(self):
expiration_date = self.webservice.get_option_chain_next_expiration_date()
example_option_chain = self.webservice.get_example_option_chain(self.config.get_environment_url, expiration_date)
Expand Down
14 changes: 5 additions & 9 deletions tests/optionstrader/test_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
import time
import datetime

from context import Webservice
from context import Database
from context import Savefile
from context import Scanner
from context import Tools
from context import optionstrader

import unittest

Expand All @@ -25,10 +21,10 @@ class TestScript(unittest.TestCase):


def setUp(self):
self.w = Webservice()
self.d = Database()
self.savefile = Savefile()
self.scanner = Scanner()
self.w = optionstrader.Webservice()
self.d = optionstrader.Database()
self.savefile = optionstrader.Savefile()
self.scanner = optionstrader.Scanner()
# Get from Tradier
self.access_token = ""
# Get from Tradier
Expand Down
11 changes: 5 additions & 6 deletions tests/optionstrader/test_stream.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
import unittest

from context import Stream
from context import CustomLog
from context import optionstrader

class TestStream(unittest.TestCase):

def log_start(method):
def __init__(*args, **kwargs):
log = CustomLog()
log = optionstrader.CustomLog()
msg = "STARTING UNITTEST".center(100, "-")
log.debug(msg)
return method(*args, **kwargs)
return __init__

def log_end(method):
def __init__(*args, **kwargs):
log = CustomLog()
log = optionstrader.CustomLog()
msg = "UNITTEST COMPLETE".center(100, "-")
log.debug(msg)
return method(*args, **kwargs)
return __init__

@log_start
def setUp(self):
self.stream = Stream()
self.log = CustomLog()
self.stream = optionstrader.Stream()
self.log = optionstrader.CustomLog()

@log_end
def tearDown(self):
Expand Down
11 changes: 4 additions & 7 deletions tests/optionstrader/test_tools.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import unittest

from context import Tools
from context import Scanner
from context import Analyzer

from context import optionstrader

class TestTools(unittest.TestCase):
# Make sure to test all, before a release

def setUp(self):
self.tools = Tools()
self.scanner = Scanner()
self.analyzer = Analyzer
self.tools = optionstrader.Tools()
self.scanner = optionstrader.Scanner()
self.analyzer = optionstrader.Analyzer()

def tearDown(self):
return
Expand Down

0 comments on commit 840a6b1

Please sign in to comment.