예제 #1
0
    def test_disable_accounts(self):
        """Test disabling an account in a session."""
        with custom_qiskitrc(), mock_ibmq_provider():
            IBMQ.enable_account('QISKITRC_TOKEN')
            IBMQ.disable_accounts(token='QISKITRC_TOKEN')

            self.assertEqual(len(IBMQ._accounts), 0)
예제 #2
0
 def test_disable_all_accounts(self):
     """Test disabling all accounts from session."""
     with custom_qiskitrc(), mock_ibmq_provider():
         IBMQ.enable_account('QISKITRC_TOKEN')
         IBMQ.enable_account('QISKITRC_TOKEN',
                             url=IBMQ_TEMPLATE.format('a', 'b', 'c'))
         IBMQ.disable_accounts()
         self.assertEqual(len(IBMQ._accounts), 0)