Ejemplo n.º 1
0
    def test_string_without_equals(self):
        """Test field set with string not containing equals sign"""
        if VERSION == 26:
            return

        msg = FixMessage()
        with self.assertRaises(ValueError):
            msg.append_string("FIX.4.2")
Ejemplo n.º 2
0
    def test_string_with_bad_tag(self):
        """Test field set with bad tag in tag=value string"""
        if VERSION == 26:
            return

        msg = FixMessage()
        with self.assertRaises(ValueError):
            msg.append_string("foo=bar")
Ejemplo n.º 3
0
def simplefix_init():
    msg = FixMessage()
    msg.append_string("8=FIX.4.2")
    msg.append_string("35=O")
    mohamed = users[0]
    schema = UserSchema()
    print(msg.get("35"))
    return jsonify(schema.dump(mohamed))
Ejemplo n.º 4
0
def logon(id):
    msg = FixMessage()
    msg.append_string("8=FIX.4.2")
    msg.append_string("35=A")
    msg.append_string("34=1")
    msg.append_string("49="+id)
    print("ok"+id)
Ejemplo n.º 5
0
 def test_string_with_equals(self):
     """Test field set with tag=value string"""
     msg = FixMessage()
     msg.append_string("8=FIX.4.2")
     self.assertEqual(fix_str("FIX.4.2"), msg.get(8))
     return
Ejemplo n.º 6
0
 def test_string_with_bad_tag(self):
     msg = FixMessage()
     try:
         msg.append_string("foo=bar")
     except ValueError:
         pass
Ejemplo n.º 7
0
 def test_string_without_equals(self):
     msg = FixMessage()
     try:
         msg.append_string("FIX.4.2")
     except ValueError:
         pass
Ejemplo n.º 8
0
 def test_string_with_equals(self):
     msg = FixMessage()
     msg.append_string("8=FIX.4.2")
     self.assertEqual("FIX.4.2", msg.get(8))
     return
Ejemplo n.º 9
0
def simplefix_init():
    msg = FixMessage()
    msg.append_string("8=FIX.4.2")
    msg.append_pair("9", "")
    return jsonify(msg)
Ejemplo n.º 10
0
def standard_header():
    msg = FixMessage()
    msg.append_string("8=FIX.4.2")
    msg.append_string("35=A")
    msg.append_string("34=1")
    msg.append_string("")