Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias alias ClassDef bases NameLoad body Assign NameStore ListLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body TryExcept body Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body If CompareIn Str Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Raise Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Set NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict Str Str AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr ListComp Call NameLoad SubscriptLoad NameLoad Index Num NameLoad comprehension NameStore NameLoad ListLoad IfExp AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str Str IfExp AttributeLoad AttributeLoad NameLoad attr attr Str Str IfExp AttributeLoad AttributeLoad NameLoad attr attr Str Str IfExp AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Str ListLoad Num Num Num decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str ListComp Call NameLoad SubscriptLoad NameLoad Index Num NameLoad comprehension NameStore NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad NameLoad Index Num Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict Str Str TupleLoad Str AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword ListLoad Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str TupleLoad Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad CompareEq AttributeLoad NameLoad attr Str Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Set TupleLoad Str AttributeLoad AttributeLoad NameLoad attr attr Str TupleLoad Str AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Dict Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIs Call NameLoad NameLoad NameLoad body Return SubscriptLoad NameLoad Index Num orelse Return NameLoad decorator_list
N/A __future__ unicode_literals unittest skipUnless django.db connection django.db.utils DatabaseError django.test TransactionTestCase mock skipUnlessDBFeature models Article ArticleReporter City Reporter IntrospectionTests N/A TransactionTestCase N/A N/A available_apps N/A introspection test_table_names N/A N/A self N/A N/A N/A tl N/A N/A N/A connection introspection table_names N/A N/A N/A self assertEqual tl N/A sorted tl N/A N/A N/A self assertIn N/A N/A Reporter _meta db_table tl N/A '%s' isn't in table_list(). N/A N/A Reporter _meta db_table N/A N/A N/A self assertIn N/A N/A Article _meta db_table tl N/A '%s' isn't in table_list(). N/A N/A Article _meta db_table N/A test_django_table_names N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A N/A N/A cursor execute CREATE TABLE django_ixn_test_table (id INTEGER); N/A tl N/A N/A N/A connection introspection django_table_names N/A N/A N/A cursor execute DROP TABLE django_ixn_test_table; N/A N/A N/A self assertNotIn django_ixn_test_table tl django_table_names() returned a non-Django table N/A test_django_table_names_retval_type N/A N/A self N/A N/A N/A tl N/A N/A N/A connection introspection django_table_names only_existing True N/A N/A N/A self assertIs N/A type tl list N/A tl N/A N/A N/A connection introspection django_table_names only_existing False N/A N/A N/A self assertIs N/A type tl list N/A test_table_names_with_views N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A N/A N/A N/A N/A cursor execute CREATE VIEW introspection_article_view AS SELECT headline from introspection_article; N/A N/A N/A DatabaseError N/A e N/A N/A N/A insufficient privileges N/A str e N/A N/A N/A N/A self fail The test user has no CREATE VIEW privileges N/A N/A N/A N/A N/A self assertIn introspection_article_view N/A N/A N/A connection introspection table_names include_views True N/A N/A N/A self assertNotIn introspection_article_view N/A N/A N/A connection introspection table_names N/A test_unmanaged_through_model N/A N/A self N/A N/A N/A tables N/A N/A N/A connection introspection django_table_names N/A N/A N/A self assertNotIn N/A N/A ArticleReporter _meta db_table tables N/A test_installed_models N/A N/A self N/A N/A N/A tables N/A N/A N/A Article _meta db_table N/A N/A Reporter _meta db_table N/A models N/A N/A N/A connection introspection installed_models tables N/A N/A N/A self assertEqual models N/A Article Reporter N/A test_sequence_list N/A N/A self N/A N/A N/A sequences N/A N/A N/A connection introspection sequence_list N/A expected N/A table column N/A N/A Reporter _meta db_table id N/A N/A N/A self assertIn expected sequences Reporter sequence not found in sequence_list() N/A test_get_table_description_names N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A desc N/A N/A N/A connection introspection get_table_description cursor N/A N/A Reporter _meta db_table N/A N/A N/A self assertEqual N/A N/A r N/A 0 N/A r desc N/A N/A f column N/A f N/A N/A Reporter _meta fields N/A test_get_table_description_types N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A desc N/A N/A N/A connection introspection get_table_description cursor N/A N/A Reporter _meta db_table N/A N/A N/A self assertEqual N/A N/A datatype N/A r N/A 1 r N/A r desc N/A N/A N/A N/A connection features can_introspect_autofield AutoField IntegerField CharField CharField CharField N/A N/A N/A connection features can_introspect_big_integer_field BigIntegerField IntegerField N/A N/A N/A connection features can_introspect_binary_field BinaryField TextField N/A N/A N/A connection features can_introspect_small_integer_field SmallIntegerField IntegerField N/A test_get_table_description_col_lengths N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A desc N/A N/A N/A connection introspection get_table_description cursor N/A N/A Reporter _meta db_table N/A N/A N/A self assertEqual N/A N/A r N/A 3 N/A r desc N/A N/A datatype N/A r N/A 1 r CharField N/A 30 30 254 N/A N/A skipUnlessDBFeature can_introspect_max_length test_get_table_description_nullable N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A desc N/A N/A N/A connection introspection get_table_description cursor N/A N/A Reporter _meta db_table N/A nullable_by_backend N/A N/A connection features interprets_empty_strings_as_nulls N/A N/A N/A self assertEqual N/A N/A r N/A 6 N/A r desc N/A False nullable_by_backend nullable_by_backend nullable_by_backend True True False N/A N/A skipUnlessDBFeature can_introspect_null test_bigautofield N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A desc N/A N/A N/A connection introspection get_table_description cursor N/A N/A City _meta db_table N/A N/A N/A self assertIn BigAutoField N/A N/A datatype N/A r N/A 1 r N/A r desc N/A N/A skipUnlessDBFeature can_introspect_autofield test_postgresql_real_type N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A N/A N/A cursor execute CREATE TABLE django_ixn_real_test_table (number REAL); N/A desc N/A N/A N/A connection introspection get_table_description cursor django_ixn_real_test_table N/A N/A N/A cursor execute DROP TABLE django_ixn_real_test_table; N/A N/A N/A self assertEqual N/A datatype N/A N/A desc N/A 0 N/A 1 N/A desc N/A 0 FloatField N/A N/A skipUnlessDBFeature has_real_datatype test_get_relations N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A relations N/A N/A N/A connection introspection get_relations cursor N/A N/A Article _meta db_table N/A expected_relations N/A reporter_id response_to_id N/A id N/A N/A Reporter _meta db_table N/A id N/A N/A Article _meta db_table N/A N/A N/A self assertEqual relations expected_relations N/A body N/A N/A N/A Article _meta get_field body N/A N/A N/A connection schema_editor editor N/A N/A N/A N/A editor remove_field Article body N/A N/A N/A connection cursor cursor N/A N/A relations N/A N/A N/A connection introspection get_relations cursor N/A N/A Article _meta db_table N/A N/A N/A connection schema_editor editor N/A N/A N/A N/A editor add_field Article body N/A N/A N/A self assertEqual relations expected_relations N/A N/A skipUnlessDBFeature can_introspect_foreign_keys test_get_relations_alt_format N/A N/A self N/A N/A N/A With SQLite, foreign keys can be added with different syntaxes. N/A N/A N/A connection cursor cursor N/A N/A N/A cursor fetchone N/A N/A mock Mock return_value N/A N/A N/A CREATE TABLE track(id, art_id INTEGER, FOREIGN KEY(art_id) REFERENCES {}(id)); format N/A N/A Article _meta db_table N/A relations N/A N/A N/A connection introspection get_relations cursor mocked_table N/A N/A N/A self assertEqual relations N/A art_id N/A id N/A N/A Article _meta db_table N/A N/A skipUnless N/A N/A connection vendor sqlite This is an sqlite-specific issue test_get_key_columns N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A key_columns N/A N/A N/A connection introspection get_key_columns cursor N/A N/A Article _meta db_table N/A N/A N/A self assertEqual N/A set key_columns N/A N/A reporter_id N/A N/A Reporter _meta db_table id N/A response_to_id N/A N/A Article _meta db_table id N/A N/A skipUnlessDBFeature can_introspect_foreign_keys test_get_primary_key_column N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A primary_key_column N/A N/A N/A connection introspection get_primary_key_column cursor N/A N/A Article _meta db_table N/A N/A N/A self assertEqual primary_key_column id N/A test_get_indexes N/A N/A self N/A N/A N/A N/A N/A connection cursor cursor N/A N/A indexes N/A N/A N/A connection introspection get_indexes cursor N/A N/A Article _meta db_table N/A N/A N/A self assertEqual N/A indexes N/A reporter_id N/A unique primary_key False False N/A test_get_indexes_multicol N/A N/A self N/A N/A N/A 
        Test that multicolumn indexes are not included in the introspection
        results.
         N/A N/A N/A connection cursor cursor N/A N/A indexes N/A N/A N/A connection introspection get_indexes cursor N/A N/A Reporter _meta db_table N/A N/A N/A self assertNotIn first_name indexes N/A N/A N/A self assertIn id indexes N/A N/A datatype N/A N/A dbtype description N/A N/A N/A Helper to convert a data type into a string. N/A dt N/A N/A N/A connection introspection get_field_type dbtype description N/A N/A N/A type dt tuple N/A N/A N/A dt N/A 0 N/A N/A dt N/A