Esempio n. 1
0
 def testDispDFrameByDate(self):
     '''******Test that we can do a return of the DF and it's HTML by date'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispDFrameByDate('2016-01-01 00:00:00',
                                           '2016-02-02 00:00:00', df)
     self.assertIsInstance(odf, pandas.core.frame.DataFrame)
     self.assertIsInstance(ostr, basestring)
Esempio n. 2
0
 def testUpdateCat(self):
     '''******Test that we can update a cat'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispOFX(df)
     self.assertTrue(
         finaUpdt.updateCat('toe', 'jamb', None, odf, "tests/assets",
                            "test.pkl"))
Esempio n. 3
0
 def testUnPickleData(self):
     '''******Test both options for unpickling the dataframe'''
     self.assertIsInstance(finaExp.unPickleData("test.pkl", "tests/assets"),
                           pandas.core.frame.DataFrame)
     self.assertIsInstance(finaExp.unPickleData("toejamb", "tests/assets"),
                           pandas.core.frame.DataFrame)
Esempio n. 4
0
 def testDispMonthPareto(self):
   '''******Test that we can spit out a buffered chart for a month pareto'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   buf = finaDisp.dispMonthPareto(df, 'b')
   self.assertIsInstance(buf, cStringIO.OutputType)
Esempio n. 5
0
 def testDispDFrameByCat(self):
   '''******Test that we can do a return of the DF and it's HTML by cat'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispDFrameByCat('hoser' , df)
   self.assertIsInstance(odf, pandas.core.frame.DataFrame)
   self.assertIsInstance(ostr, basestring)
Esempio n. 6
0
 def testDispDFrameByDate(self):
   '''******Test that we can do a return of the DF and it's HTML by date'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispDFrameByDate('2016-01-01 00:00:00', '2016-02-02 00:00:00', df)
   self.assertIsInstance(odf, pandas.core.frame.DataFrame)
   self.assertIsInstance(ostr, basestring)
Esempio n. 7
0
 def testDispOFX(self):
   '''******Test that we can do the basic return of a DF and it's HTML'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispOFX(df)
   self.assertIsInstance(odf, pandas.core.frame.DataFrame)
   self.assertIsInstance(ostr, basestring)
Esempio n. 8
0
 def testPickleDataFrame(self):
     '''******Test that we can pickle a data frame successfully.'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     finaImp.pickleDataFrame(df, "this.pkl", "tests/assets")
     self.assertTrue(os.path.isfile("tests/assets/this.pkl"))
     os.remove("tests/assets/this.pkl")
Esempio n. 9
0
 def testDispMonthPareto(self):
     '''******Test that we can spit out a buffered chart for a month pareto'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     buf = finaDisp.dispMonthPareto(df, 'b')
     self.assertIsInstance(buf, cStringIO.OutputType)
Esempio n. 10
0
 def testDispDFrameByCat(self):
     '''******Test that we can do a return of the DF and it's HTML by cat'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispDFrameByCat('hoser', df)
     self.assertIsInstance(odf, pandas.core.frame.DataFrame)
     self.assertIsInstance(ostr, basestring)
Esempio n. 11
0
 def testDispOFX(self):
     '''******Test that we can do the basic return of a DF and it's HTML'''
     df = finaExp.unPickleData("test.pkl", "tests/assets")
     odf, ostr = finaDisp.dispOFX(df)
     self.assertIsInstance(odf, pandas.core.frame.DataFrame)
     self.assertIsInstance(ostr, basestring)
Esempio n. 12
0
 def testUpdateCat(self):
   '''******Test that we can update a cat'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   odf, ostr = finaDisp.dispOFX(df)
   self.assertTrue(finaUpdt.updateCat('toe', 'jamb', None,  odf, "tests/assets", "test.pkl"))
Esempio n. 13
0
 def testPickleDataFrame(self):
   '''******Test that we can pickle a data frame successfully.'''
   df = finaExp.unPickleData("test.pkl", "tests/assets")
   finaImp.pickleDataFrame(df, "this.pkl", "tests/assets")
   self.assertTrue(os.path.isfile("tests/assets/this.pkl"))
   os.remove("tests/assets/this.pkl")