Beispiel #1
0
def receive_new_account_name( logon_seq, account_name):
    if ( not util.is_alphanumeric( account_name ) ):
        logon_seq.send("Account names may only contain letters, numbers, and underscores.")
        logon_input_new_account_name( logon_seq, None)
        return    
    
    if ( account_name_unused( account_name ) ):
        account = Account( account_name )
        logon_input_new_account_password( logon_seq, account )
    else:
        logon_seq.send("Account name %s already exists.\n" % account_name )
        logon_input_new_account_name( logon_seq, None )
Beispiel #2
0
 def testis_alphanumeric(self):
     self.assert_( util.is_alphanumeric("abc_123"))
Beispiel #3
0
 def testis_not_alphanumeric(self):
     self.assert_(not util.is_alphanumeric("  yo__!!"))
Beispiel #4
0
 def testis_not_alphanumeric(self):
     self.assert_( not util.is_alphanumeric("  yo__!!"))
Beispiel #5
0
 def testis_alphanumeric(self):
     self.assert_(util.is_alphanumeric("abc_123"))