Beispiel #1
0
 def testSignonVersion102(self):
     # CLIENTUID wasn't defined until OFX version 1.0.3,
     # so it returns None if if initialized.
     client = OFXClient("http://example.com",
                        userid="porkypig",
                        clientuid="DEADBEEF",
                        version=102)
     signon = client.signon("t0ps3kr1t")
     self.assertIsInstance(signon, SIGNONMSGSRQV1)
     signon = signon.sonrq
     self.assertIsNone(signon.clientuid)
Beispiel #2
0
 def testSignonEmptyFIORG(self):
     client = OFXClient("http://example.com", userid="porkypig")
     with patch("ofxtools.Client.OFXClient.dtclient") as mock_dtclient:
         mock_dtclient.return_value = datetime(2017, 4, 1, tzinfo=UTC)
         signon = client.signon("t0ps3kr1t")
         self.assertIsInstance(signon, SIGNONMSGSRQV1)
         signon = signon.sonrq
         self.assertIsInstance(signon, SONRQ)
         self.assertEqual(signon.dtclient, datetime(2017, 4, 1, tzinfo=UTC))
         self.assertEqual(signon.userid, "porkypig")
         self.assertEqual(signon.userpass, "t0ps3kr1t")
         self.assertEqual(signon.language, "ENG")
         self.assertIsNone(signon.fi)
         self.assertIsNone(signon.sesscookie)
         self.assertEqual(signon.appid, client.appid)
         self.assertEqual(signon.appver, client.appver)
         self.assertIsNone(signon.clientuid)
Beispiel #3
0
 def testSignonEmptyFIORG(self):
     client = OFXClient("http://example.com", userid="porkypig")
     with patch("ofxtools.Client.OFXClient.dtclient") as mock_dtclient:
         mock_dtclient.return_value = datetime(2017, 4, 1, tzinfo=UTC)
         signon = client.signon("t0ps3kr1t")
         self.assertIsInstance(signon, SIGNONMSGSRQV1)
         signon = signon.sonrq
         self.assertIsInstance(signon, SONRQ)
         self.assertEqual(signon.dtclient, datetime(2017, 4, 1, tzinfo=UTC))
         self.assertEqual(signon.userid, "porkypig")
         self.assertEqual(signon.userpass, "t0ps3kr1t")
         self.assertEqual(signon.language, "ENG")
         self.assertIsNone(signon.fi)
         self.assertIsNone(signon.sesscookie)
         self.assertEqual(signon.appid, client.appid)
         self.assertEqual(signon.appver, client.appver)
         self.assertIsNone(signon.clientuid)