Exemple #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")
Exemple #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")
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))
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)
Exemple #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
Exemple #6
0
 def test_string_with_bad_tag(self):
     msg = FixMessage()
     try:
         msg.append_string("foo=bar")
     except ValueError:
         pass
Exemple #7
0
 def test_string_without_equals(self):
     msg = FixMessage()
     try:
         msg.append_string("FIX.4.2")
     except ValueError:
         pass
Exemple #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
Exemple #9
0
def simplefix_init():
    msg = FixMessage()
    msg.append_string("8=FIX.4.2")
    msg.append_pair("9", "")
    return jsonify(msg)
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("")