<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> import logging <EOL> from django import test <EOL> from services . common import helpers as db_tools <EOL> from services . leop import views as leop_views <EOL> class TestLeopViews ( test . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . __verbose_testing = False <EOL> self . __sc_id = '<STR_LIT>' <EOL> self . __ufo_id = '<STR_LIT>' <EOL> self . __user_1 = db_tools . create_user_profile ( ) <EOL> self . __user_2 = db_tools . create_user_profile ( username = '<STR_LIT>' ) <EOL> self . __request_1 = db_tools . create_request ( user_profile = self . __user_1 ) <EOL> self . __request_2 = db_tools . create_request ( user_profile = self . __user_2 ) <EOL> self . __sc = db_tools . create_sc ( <EOL> user_profile = self . __user_1 , identifier = self . __sc_id <EOL> ) <EOL> self . __ufo = db_tools . create_sc ( <EOL> user_profile = self . __user_2 , identifier = self . __ufo_id , is_ufo = True <EOL> ) <EOL> self . __admin = db_tools . create_user_profile ( <EOL> username = '<STR_LIT>' , <EOL> email = '<STR_LIT>' , <EOL> is_staff = True <EOL> ) <EOL> self . __request_3 = db_tools . create_request ( user_profile = self . __admin ) <EOL> self . __cluster = db_tools . create_launch ( admin = self . __admin ) <EOL> if not self . __verbose_testing : <EOL> logging . getLogger ( '<STR_LIT>' ) . setLevel ( level = logging . CRITICAL ) <EOL> def test_get_queryset ( self ) : <EOL> """<STR_LIT>""" <EOL> cm = leop_views . LaunchManagementView ( ) <EOL> cm . request = self . __request_1 <EOL> qs = cm . get_queryset ( ) <EOL> self . assertEqual ( len ( qs ) , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> cm . request = self . __request_3 <EOL> qs_2 = cm . get_queryset ( ) <EOL> self . assertEqual ( len ( qs_2 ) , <NUM_LIT:1> , '<STR_LIT>' ) </s>
