# Generated by CodiumAI
import pytest


from src.NetSuite_Connector.ODBC import ODBC


class TestODBC:

    # ODBC can be instantiated with valid account_id, consumer_keys, and token_keys.
    def test_instantiation_with_valid_keys(self):
        account_id = "123456"
        consumer_keys = {"consumer_key": "2345678", "consumer_secret": "3456yhg"}
        token_keys = {"token_key": "wfdbfdsdfg", "token_secret": "efguhfjoidejhfije"}

        odbc = ODBC(account_id, consumer_keys, token_keys)

        assert odbc.account_id == account_id
        assert odbc.consumer_key == consumer_keys["consumer_key"]
        assert odbc.consumer_secret == consumer_keys["consumer_secret"]
        assert odbc.token_id == token_keys["token_key"]
        assert odbc.token_secret == token_keys["token_secret"]

    # ODBC raises a ValueError if instantiated with missing required keys.
    def test_instantiation_with_missing_keys(self):
        account_id = 123456
        consumer_keys = {"consumer_key": "2345678"}
        token_keys = {"token_key": "wfdbfdsdfg", "token_secret": "efguhfjoidejhfije"}

        with pytest.raises(ValueError):
            ODBC(account_id, consumer_keys, token_keys)
