@defer.inlineCallbacks
    def test_01_smpps_basic(self):
        stats = SMPPServerStatsCollector().get(cid = self.smpps_config.id)

        self.assertTrue(type(stats.get('created_at')) == datetime)
        self.assertEqual(stats.get('last_received_pdu_at'), 0)
        self.assertEqual(stats.get('last_sent_pdu_at'), 0)
        self.assertEqual(stats.get('connected_count'), 0)
        self.assertEqual(stats.get('connect_count'), 0)
        self.assertEqual(stats.get('disconnect_count'), 0)
        self.assertEqual(stats.get('bound_trx_count'), 0)
        self.assertEqual(stats.get('bound_rx_count'), 0)
        self.assertEqual(stats.get('bound_tx_count'), 0)
        self.assertEqual(stats.get('bind_trx_count'), 0)
        self.assertEqual(stats.get('bind_rx_count'), 0)
        self.assertEqual(stats.get('bind_tx_count'), 0)
        self.assertEqual(stats.get('unbind_count'), 0)

        # Connect and bind
        yield self.smppc_factory.connectAndBind()
        self.assertEqual(self.smppc_factory.smpp.sessionState, SMPPSessionStates.BOUND_TRX)

        self.assertTrue(type(stats.get('created_at')) == datetime)
        self.assertTrue(type(stats.get('last_received_pdu_at')) == datetime)
        self.assertTrue(type(stats.get('last_sent_pdu_at')) == datetime)
        self.assertEqual(stats.get('connected_count'), 1)
        self.assertEqual(stats.get('connect_count'), 1)
        self.assertEqual(stats.get('disconnect_count'), 0)
        self.assertEqual(stats.get('bound_trx_count'), 1)
        self.assertEqual(stats.get('bound_rx_count'), 0)
        self.assertEqual(stats.get('bound_tx_count'), 0)
        self.assertEqual(stats.get('bind_trx_count'), 1)
        self.assertEqual(stats.get('bind_rx_count'), 0)
        self.assertEqual(stats.get('bind_tx_count'), 0)
        self.assertEqual(stats.get('unbind_count'), 0)

        # Unbind & Disconnect
        yield self.smppc_factory.smpp.unbindAndDisconnect()
        self.assertEqual(self.smppc_factory.smpp.sessionState, SMPPSessionStates.UNBOUND)

        self.assertTrue(type(stats.get('created_at')) == datetime)
        self.assertTrue(type(stats.get('last_received_pdu_at')) == datetime)
        self.assertTrue(type(stats.get('last_sent_pdu_at')) == datetime)
        self.assertEqual(stats.get('connected_count'), 0)
        self.assertEqual(stats.get('connect_count'), 1)
        self.assertEqual(stats.get('disconnect_count'), 1)
        self.assertEqual(stats.get('bound_trx_count'), 0)
        self.assertEqual(stats.get('bound_rx_count'), 0)
        self.assertEqual(stats.get('bound_tx_count'), 0)
        self.assertEqual(stats.get('bind_trx_count'), 1)
        self.assertEqual(stats.get('bind_rx_count'), 0)
        self.assertEqual(stats.get('bind_tx_count'), 0)
        self.assertEqual(stats.get('unbind_count'), 1)
Sets up all the temporary files and then dispatches the job.
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/smpp/test/test_smpp_server.py/StatsTestCases.test_01_smpps_basic--crossover with--dataset/ETHPy150Open codalab/codalab-cli/codalab/machines/remote_machine.py/RemoteMachine.start_bundle