Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #9293: Corrected expected test output for the admin_scripts tes…

…ts, following the changes to --verbosity in 9110. Thanks to Alex for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a8557557118d453e51ead4d7685f863c4c4ef5c9 1 parent 8d98e70
Russell Keith-Magee authored October 04, 2008
34  tests/regressiontests/admin_scripts/tests.py
@@ -921,42 +921,42 @@ def test_base_command(self):
921 921
         args = ['base_command','testlabel']
922 922
         out, err = self.run_manage(args)
923 923
         self.assertNoOutput(err)
924  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', '1'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None)]")
  924
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', '1'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
925 925
 
926 926
     def test_base_command_no_label(self):
927 927
         "User BaseCommands can execute when no labels are provided"
928 928
         args = ['base_command']
929 929
         out, err = self.run_manage(args)
930 930
         self.assertNoOutput(err)
931  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=(), options=[('option_a', '1'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None)]")
  931
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=(), options=[('option_a', '1'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
932 932
 
933 933
     def test_base_command_multiple_label(self):
934 934
         "User BaseCommands can execute when no labels are provided"
935 935
         args = ['base_command','testlabel','anotherlabel']
936 936
         out, err = self.run_manage(args)
937 937
         self.assertNoOutput(err)
938  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel', 'anotherlabel'), options=[('option_a', '1'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None)]")
  938
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel', 'anotherlabel'), options=[('option_a', '1'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
939 939
 
940 940
     def test_base_command_with_option(self):
941 941
         "User BaseCommands can execute with options when a label is provided"
942 942
         args = ['base_command','testlabel','--option_a=x']
943 943
         out, err = self.run_manage(args)
944 944
         self.assertNoOutput(err)
945  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None)]")
  945
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
946 946
 
947 947
     def test_base_command_with_options(self):
948 948
         "User BaseCommands can execute with multiple options when a label is provided"
949 949
         args = ['base_command','testlabel','-a','x','--option_b=y']
950 950
         out, err = self.run_manage(args)
951 951
         self.assertNoOutput(err)
952  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', 'y'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None)]")
  952
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', 'y'), ('option_c', '3'), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
953 953
 
954 954
     def test_noargs(self):
955 955
         "NoArg Commands can be executed"
956 956
         args = ['noargs_command']
957 957
         out, err = self.run_manage(args)
958 958
         self.assertNoOutput(err)
959  
-        self.assertOutput(out, "EXECUTE:NoArgsCommand options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
  959
+        self.assertOutput(out, "EXECUTE:NoArgsCommand options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
960 960
 
961 961
     def test_noargs_with_args(self):
962 962
         "NoArg Commands raise an error if an argument is provided"
@@ -971,7 +971,7 @@ def test_app_command(self):
971 971
         self.assertNoOutput(err)
972 972
         self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'")
973 973
         self.assertOutput(out, os.sep.join(['django','contrib','auth','models.py']))
974  
-        self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
  974
+        self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
975 975
 
976 976
     def test_app_command_no_apps(self):
977 977
         "User AppCommands raise an error when no app name is provided"
@@ -986,10 +986,10 @@ def test_app_command_multiple_apps(self):
986 986
         self.assertNoOutput(err)
987 987
         self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'")
988 988
         self.assertOutput(out, os.sep.join(['django','contrib','auth','models.py']))
989  
-        self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
  989
+        self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
990 990
         self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.contenttypes.models'")
991 991
         self.assertOutput(out, os.sep.join(['django','contrib','contenttypes','models.py']))
992  
-        self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
  992
+        self.assertOutput(out, "'>, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
993 993
 
994 994
     def test_app_command_invalid_appname(self):
995 995
         "User AppCommands can execute when a single app name is provided"
@@ -1008,7 +1008,7 @@ def test_label_command(self):
1008 1008
         args = ['label_command','testlabel']
1009 1009
         out, err = self.run_manage(args)
1010 1010
         self.assertNoOutput(err)
1011  
-        self.assertOutput(out, "EXECUTE:LabelCommand label=testlabel, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
  1011
+        self.assertOutput(out, "EXECUTE:LabelCommand label=testlabel, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
1012 1012
 
1013 1013
     def test_label_command_no_label(self):
1014 1014
         "User LabelCommands raise an error if no label is provided"
@@ -1021,8 +1021,8 @@ def test_label_command_multiple_label(self):
1021 1021
         args = ['label_command','testlabel','anotherlabel']
1022 1022
         out, err = self.run_manage(args)
1023 1023
         self.assertNoOutput(err)
1024  
-        self.assertOutput(out, "EXECUTE:LabelCommand label=testlabel, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
1025  
-        self.assertOutput(out, "EXECUTE:LabelCommand label=anotherlabel, options=[('pythonpath', None), ('settings', None), ('traceback', None)]")
  1024
+        self.assertOutput(out, "EXECUTE:LabelCommand label=testlabel, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
  1025
+        self.assertOutput(out, "EXECUTE:LabelCommand label=anotherlabel, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', '1')]")
1026 1026
 
1027 1027
 class ArgumentOrder(AdminScriptTestCase):
1028 1028
     """Tests for 2-stage argument parsing scheme.
@@ -1046,33 +1046,33 @@ def test_setting_then_option(self):
1046 1046
         args = ['base_command','testlabel','--settings=alternate_settings','--option_a=x']
1047 1047
         out, err = self.run_manage(args)
1048 1048
         self.assertNoOutput(err)
1049  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None)]")
  1049
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None), ('verbosity', '1')]")
1050 1050
 
1051 1051
     def test_setting_then_short_option(self):
1052 1052
         "Short options passed after settings are correctly handled"
1053 1053
         args = ['base_command','testlabel','--settings=alternate_settings','--option_a=x']
1054 1054
         out, err = self.run_manage(args)
1055 1055
         self.assertNoOutput(err)
1056  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None)]")
  1056
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None), ('verbosity', '1')]")
1057 1057
 
1058 1058
     def test_option_then_setting(self):
1059 1059
         "Options passed before settings are correctly handled"
1060 1060
         args = ['base_command','testlabel','--option_a=x','--settings=alternate_settings']
1061 1061
         out, err = self.run_manage(args)
1062 1062
         self.assertNoOutput(err)
1063  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None)]")
  1063
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None), ('verbosity', '1')]")
1064 1064
 
1065 1065
     def test_short_option_then_setting(self):
1066 1066
         "Short options passed before settings are correctly handled"
1067 1067
         args = ['base_command','testlabel','-a','x','--settings=alternate_settings']
1068 1068
         out, err = self.run_manage(args)
1069 1069
         self.assertNoOutput(err)
1070  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None)]")
  1070
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', '2'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None), ('verbosity', '1')]")
1071 1071
 
1072 1072
     def test_option_then_setting_then_option(self):
1073 1073
         "Options are correctly handled when they are passed before and after a setting"
1074 1074
         args = ['base_command','testlabel','--option_a=x','--settings=alternate_settings','--option_b=y']
1075 1075
         out, err = self.run_manage(args)
1076 1076
         self.assertNoOutput(err)
1077  
-        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', 'y'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None)]")
  1077
+        self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', 'y'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None), ('verbosity', '1')]")
1078 1078
 

0 notes on commit a855755

Please sign in to comment.
Something went wrong with that request. Please try again.