Beispiel #1
0
    def test_get_txn_flow_ok(self):
        self.assertEqual(
            "{Incoming}",
            app._get_txn_flow({
                "txn_flow": "Incoming",
            }),
        )

        self.assertEqual(
            "{Incoming}",
            app._get_txn_flow({
                "txn_flow": " Incoming ",
            }),
        )

        self.assertEqual(
            "{Outgoing,Incoming}",
            app._get_txn_flow({
                "txn_flow": "Outgoing,Incoming",
            }),
        )

        self.assertEqual(
            "{Outgoing,Incoming}",
            app._get_txn_flow({
                "txn_flow": " Outgoing, Incoming ",
            }),
        )
Beispiel #2
0
    def test_get_txn_flow_empty(self):
        self.assertEqual(
            "{Outgoing,Incoming}",  # Default
            app._get_txn_flow({
                "txn_flow": "",
            }),
        )

        self.assertEqual(
            "{Outgoing,Incoming}",  # Default
            app._get_txn_flow({
                "txn_flow": " ",
            }),
        )
Beispiel #3
0
 def test_get_txn_flow_no_txn_flow_key(self):
     self.assertEqual(
         "{Outgoing,Incoming}",  # Default
         app._get_txn_flow({
             "hello": "world",
         }),
     )
Beispiel #4
0
 def test_get_txn_flow_no_query_params(self):
     self.assertEqual(
         "{Outgoing,Incoming}",  # Default
         app._get_txn_flow(None),
     )