Exemplo n.º 1
0
    def test_initialized(self, initialize, _load_test_config):
        """
        Assert that the function is a noop when the connection is already initialized.
        """
        base.start_database_connection()

        self.assertEqual(_load_test_config.call_count, 0)
        self.assertEqual(initialize.call_count, 0)
Exemplo n.º 2
0
    def test_initialized(self, initialize, _load_test_config):
        """
        Assert that the function is a noop when the connection is already initialized.
        """
        base.start_database_connection()

        self.assertEqual(_load_test_config.call_count, 0)
        self.assertEqual(initialize.call_count, 0)
Exemplo n.º 3
0
    def test_not_initialized(self, initialize, _load_test_config):
        """
        Assert that the function starts the connection when the connection is not already
        initialized.
        """
        base.start_database_connection()

        _load_test_config.assert_called_once_with()
        initialize.assert_called_once_with()
Exemplo n.º 4
0
    def test_not_initialized(self, initialize, _load_test_config):
        """
        Assert that the function starts the connection when the connection is not already
        initialized.
        """
        base.start_database_connection()

        _load_test_config.assert_called_once_with()
        initialize.assert_called_once_with()
Exemplo n.º 5
0
def setup():
    """
    Set up the database connection for the tests to use.
    """
    devel_base.start_database_connection()
Exemplo n.º 6
0
def setup():
    """
    Set up the database connection for the tests to use.
    """
    devel_base.start_database_connection()