Exemplo n.º 1
0
class SimpleDatabaseIntrospectionTests(SimpleTestCase):
    may_require_msg = (
        "subclasses of BaseDatabaseIntrospection may require a %s() method")

    def setUp(self):
        self.introspection = BaseDatabaseIntrospection(connection=connection)

    def test_get_table_list(self):
        msg = self.may_require_msg % "get_table_list"
        with self.assertRaisesMessage(NotImplementedError, msg):
            self.introspection.get_table_list(None)

    def test_get_table_description(self):
        msg = self.may_require_msg % "get_table_description"
        with self.assertRaisesMessage(NotImplementedError, msg):
            self.introspection.get_table_description(None, None)

    def test_get_sequences(self):
        msg = self.may_require_msg % "get_sequences"
        with self.assertRaisesMessage(NotImplementedError, msg):
            self.introspection.get_sequences(None, None)

    def test_get_relations(self):
        msg = self.may_require_msg % "get_relations"
        with self.assertRaisesMessage(NotImplementedError, msg):
            self.introspection.get_relations(None, None)

    def test_get_constraints(self):
        msg = self.may_require_msg % "get_constraints"
        with self.assertRaisesMessage(NotImplementedError, msg):
            self.introspection.get_constraints(None, None)
Exemplo n.º 2
0
 def __init__(self, conn: Any) -> None:
     BaseDatabaseIntrospection.__init__(self, conn)
     self._table_names = set()  # type: Set[str]
     self._table_list_cache = None  # type: Optional[Dict[str, Any]]
     self._table_description_cache = {}  # type: Dict[str, Dict[str, Any]]
     self._converted_lead_status = None  # type: Optional[str]
     self.is_tooling_api = False  # modified by other modules
 def __init__(self, conn):
     BaseDatabaseIntrospection.__init__(self, conn)
     self._table_list_cache = None
     self._table_description_cache = {}
     self._converted_lead_status = None
	def __init__(self, conn):
		BaseDatabaseIntrospection.__init__(self, conn)
		self._table_list_cache = None
		self._table_description_cache = {}
		self._converted_lead_status = None
Exemplo n.º 5
0
 def table_names(self, cursor=None):
     return BaseDatabaseIntrospection.table_names(self, cursor)
Exemplo n.º 6
0
 def __init__(self, conn):
     BaseDatabaseIntrospection.__init__(self, conn)
     self._table_list_cache = None
     self._table_description_cache = {}
     self._oauth = None
Exemplo n.º 7
0
 def setUp(self):
     self.introspection = BaseDatabaseIntrospection(connection=connection)
Exemplo n.º 8
0
	def __init__(self, conn):
		BaseDatabaseIntrospection.__init__(self, conn)
		self._table_list_cache = None
		self._table_description_cache = {}
		self._oauth = None
Exemplo n.º 9
0
 def table_names(self, cursor=None):
     return BaseDatabaseIntrospection.table_names(self, cursor)