@@ -15,10 +15,11 @@ class Base(Plugin):
1515 """
1616 This plugin adds the following command-line options to nosetests:
1717 --env=ENV (Set the test env. Access with "self.env" in tests.)
18- --data=DATA (Extra test data. Access with "self.data" in tests.)
19- --var1=DATA (Extra test data. Access with "self.var1" in tests.)
20- --var2=DATA (Extra test data. Access with "self.var2" in tests.)
21- --var3=DATA (Extra test data. Access with "self.var3" in tests.)
18+ --account=STR (Set account. Access with "self.account" in tests.)
19+ --data=STRING (Extra test data. Access with "self.data" in tests.)
20+ --var1=STRING (Extra test data. Access with "self.var1" in tests.)
21+ --var2=STRING (Extra test data. Access with "self.var2" in tests.)
22+ --var3=STRING (Extra test data. Access with "self.var3" in tests.)
2223 --settings-file=FILE (Override default SeleniumBase settings.)
2324 --archive-logs (Archive old log files instead of deleting them.)
2425 --archive-downloads (Archive old downloads instead of deleting.)
@@ -43,11 +44,23 @@ def options(self, parser, env):
4344 constants .Environment .DEVELOP ,
4445 constants .Environment .PRODUCTION ,
4546 constants .Environment .MASTER ,
47+ constants .Environment .REMOTE ,
4648 constants .Environment .LOCAL ,
49+ constants .Environment .ALPHA ,
50+ constants .Environment .BETA ,
51+ constants .Environment .MAIN ,
4752 constants .Environment .TEST ,
4853 ),
4954 default = constants .Environment .TEST ,
50- help = "The environment to run the tests in." ,
55+ help = """This option sets a test env from a list of choices.
56+ In tests, use "self.environment" to get the env.""" ,
57+ )
58+ parser .add_option (
59+ "--account" ,
60+ dest = "account" ,
61+ default = None ,
62+ help = """This option sets a test account string.
63+ In tests, use "self.account" to get the value.""" ,
5164 )
5265 parser .add_option (
5366 "--data" ,
@@ -171,6 +184,7 @@ def configure(self, options, conf):
171184 def beforeTest (self , test ):
172185 test .test .environment = self .options .environment
173186 test .test .env = self .options .environment # Add a shortened version
187+ test .test .account = self .options .account
174188 test .test .data = self .options .data
175189 test .test .var1 = self .options .var1
176190 test .test .var2 = self .options .var2
0 commit comments