summaryrefslogtreecommitdiff
path: root/invest-applet/invest/test.py
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-13 13:54:33 +0300
committerraveit65 <[email protected]>2018-01-14 16:19:48 +0100
commit41f7b7a2a38ca9f3929fcbd88d228b3815034876 (patch)
tree4da95992b542ba378b7ccc82b8d55a3dd86302d3 /invest-applet/invest/test.py
parent55fbad37580a11d2ac539b382f463af2f12e114c (diff)
downloadmate-applets-41f7b7a2a38ca9f3929fcbd88d228b3815034876.tar.bz2
mate-applets-41f7b7a2a38ca9f3929fcbd88d228b3815034876.tar.xz
drop broken invest-applet and all Python dependencies
closes https://github.com/mate-desktop/mate-applets/issues/297
Diffstat (limited to 'invest-applet/invest/test.py')
-rwxr-xr-xinvest-applet/invest/test.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/invest-applet/invest/test.py b/invest-applet/invest/test.py
deleted file mode 100755
index 046881bb..00000000
--- a/invest-applet/invest/test.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-
-import unittest
-from os.path import *
-import sys
-
-# Make sure we run the local version
-sys.path.insert(0, abspath(dirname(__file__) + "/.."))
-print sys.path
-
-import quotes
-import mate_invest
-
-def null_function (*args):
- pass
-
-class TestQuotes (unittest.TestCase):
- def testQuoteUpdater_populate (self):
- qu = quotes.QuoteUpdater (null_function, null_function)
- mate_invest.STOCKS = {'GOGO': {'label': "Google Inc.", 'purchases': [{'amount' : 1, 'comission' : 0.0, 'bought': 0.0}]}, 'JAVA': {'label':"Sun Microsystems Inc.", 'purchases': [{'amount' : 1, 'comission' : 0.0, 'bought': 0.0}]}}
- quote = { 'GOGO': { "ticker": 'GOGO', "trade": 386.91, "time": "10/3/2008", "date": "4.00pm", "variation": -3.58, "open": 397.14, "variation_pct": 10 }}
- qu.populate (quote)
- self.assertEqual (qu.quotes_valid, True)
- # In response to bug 554425, try a stock that isn't in our database
- quote = { "clearlyFake": { "ticker": "clearlyFake", "trade": 386.91, "time": "10/3/2008", "date": "4.00pm", "variation": -3.58, "open": 397.14, "variation_pct": 10 }}
- qu.populate (quote)
- self.assertEqual (qu.quotes_valid, False)
-
-if __name__ == '__main__':
- unittest.main ()