<s> from __future__ import absolute_import <EOL> from django . test import TestCase <EOL> from . models import Child1 , Child2 , Child3 , Child4 , Child5 , Child6 , Child7 <EOL> class ManagersRegressionTests ( TestCase ) : <EOL> def test_managers ( self ) : <EOL> a1 = Child1 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' ) <EOL> a2 = Child1 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' ) <EOL> b1 = Child2 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' , value = <NUM_LIT:1> ) <EOL> b2 = Child2 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' , value = <NUM_LIT> ) <EOL> c1 = Child3 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' , comment = '<STR_LIT:yes>' ) <EOL> c2 = Child3 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' , comment = '<STR_LIT>' ) <EOL> d1 = Child4 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' ) <EOL> d2 = Child4 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' ) <EOL> e1 = Child5 . objects . create ( name = '<STR_LIT>' , comment = '<STR_LIT:yes>' ) <EOL> e2 = Child5 . objects . create ( name = '<STR_LIT>' , comment = '<STR_LIT>' ) <EOL> f1 = Child6 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' , value = <NUM_LIT> ) <EOL> f2 = Child6 . objects . create ( name = '<STR_LIT>' , data = '<STR_LIT>' , value = <NUM_LIT> ) <EOL> g1 = Child7 . objects . create ( name = '<STR_LIT>' ) <EOL> g2 = Child7 . objects . create ( name = '<STR_LIT>' ) <EOL> self . assertQuerysetEqual ( Child1 . manager1 . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child1 . manager2 . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child1 . _default_manager . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child2 . _default_manager . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child2 . restricted . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child3 . _default_manager . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child3 . manager1 . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child3 . manager2 . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child4 . _default_manager . order_by ( '<STR_LIT:data>' ) , [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> ) <EOL> self . assertQuerysetEqual ( Child4 . manager1 . all ( ) , [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> ) <EOL> self . assertQuerysetEqual ( Child5 . _default_manager . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child6 . _default_manager . all ( ) , [ "<STR_LIT>" ] ) <EOL> self . assertQuerysetEqual ( Child7 . _default_manager . order_by ( '<STR_LIT:name>' ) , [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> ) </s>
