https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /proc/self/root/lib/python2.7/site-packages/south/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/lib/python2.7/site-packages/south/tests/db_mysql.pyc
�
���Qc@s�ddlmZmZddlmZmZmZddlmZm	Z	ddl
mZdefd��YZ
dee
ej�fd��YZd	S(
i����(tunittestt
skipUnless(tdbtgenerictmysql(t
connectiontmodels(twith_metaclasstTestMySQLOperationsMetacBseZd�ZRS(cCsmttjdkd�}x<|j�D].\}}|jd�r%||�||<q%q%Wtj||||�S(NRsMySQL-specific teststtest(RRtbackend_nametitemst
startswithttypet__new__(tmcstnametbasestdict_t	decoratortkeytmethod((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyRs
(t__name__t
__module__R(((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyRstTestMySQLOperationscBsheZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(sMySQL-specific testscCstt_tj�dS(N(tFalseRtdebugtclear_deferred_sql(tself((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pytsetUps	cCsdS(N((R((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyttearDown!sc
Cs�tjddd|dddddtjd	g�}tj|dtjd
t�fg�tj|dtjd
t�fdtj|�fg�|S(Nt
model_nametForeigntdb_tablet
db_tablespacett
pk_field_nametidt
pk_field_typet
pk_field_argstprimary_keytforeign(Rt
mock_modelRt	AutoFieldtcreate_tabletTruet
ForeignKey(Rt	main_nametreference_nameR ((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyt_create_foreign_tables$s				cCs�d}d}tj�|j||�tj�tj|d�d}tj||�}|j|df|�tj|�tj|�dS(s0Tests that referred table is reported accuratelyttest_cns_refttest_cr_foreignt
foreign_idiR%N(Rtstart_transactionR1texecute_deferred_sqlt_find_foreign_constraintst_lookup_constraint_referencestassertEqualstdelete_table(Rt
main_tabletreference_tablet
constraintt
references((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyttest_constraint_references4s


cCs�d}d}tj�|j||�tj�tj|d�}|d\}}}|j||�|jd|�tj|�tj|�dS(s=Tests that referred column in a foreign key (ex. id) is foundttest_reverse_refttest_rr_foreignR%iR4N(RR5R1R6t_lookup_reverse_constraintR9R:(RR;R<tinversetcnamet	rev_tablet
rev_column((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyttest_reverse_column_constraintAs


cCs�d}d}|j||�tj�tj|d�}|jt|�d�tj|d�tj|d�}|jt|�d�tj|�tj|�dS(Nttest_drop_foreignttest_df_refR4ii(R1RR6R7R9tlent
delete_columnR:(RR;t	ref_tabletconstraints((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyttest_delete_fk_columnOs

cCs�d}d}|j||�tj�tj|d�}|jt|�d�tj|dd�tj�tj|d�}|jt|�d�tj|�tj|�dS(Nttest_rename_foreignttest_rf_refR4itreference_id(R1RR6R7R9RJt
rename_columnR:(RR;RLRM((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyttest_rename_fk_column\s


cCs�d}d}|j||�tj�tj|d�}|jt|�d�tj|dd�tj�tj|d�}|jt|�d�tj|d�d}tj||�\}}|j|d�tj	|�tj	|�dS(	s�
        Tests that the column referred to by an external column can be renamed.
        Edge case, but also useful as stepping stone to renaming tables.
        ttest_rename_fk_inboundttest_rfi_refR%itrfi_idR4iN(
R1RR6RBR9RJRRR7R8R:(RR;RLRMRDtrtabletrcolumn((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyRTjs


cCs�d}d}d}|j||�tj�tj|d�}|jt|�d�tj||�tj�tj|d�}|jt|�d�tj||d�\}}|j|d�tj|�tj|�dS(	sARenames a table with a foreign key column (towards another table)t
test_rn_tablettest_rt_refttest_renamed_tableR4iiR%N(	R1RR6R7R9RJtrename_tableR8R:(RR;RLt
renamed_tableRMRWRX((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyttest_rename_constrained_tables 


cCs�d}d}d}|j||�tj�tj|�}|jt|�d�tj||�tj�tj|d�}|jt|�d�tj||d�\}}|j||�tj	|�tj	|�dS(s+Rename a table referred to in a foreign keyttest_rn_refd_tablettest_rrt_refttest_renamed_refiR4iN(
R1RR6RBR9RJR\R7R8R:(RR;RLR]RMRWRX((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyttest_renamed_referenced_table�s 


(
RRt__doc__RRR1R?RGRNRSRTR^Rb(((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyRs				
		
			N(tsouth.testsRRtsouth.dbRRRt	django.dbRRtsouth.utils.py3RR
RtTestCaseR(((s8/usr/lib/python2.7/site-packages/south/tests/db_mysql.pyt<module>s


https://t.me/AnonymousX5 - 2025