Commits

Yuki KODAMA committed 5e36cb3

test: fix test case

  • Participants
  • Parent commits 950a890

Comments (0)

Files changed (1)

File tests/test_user_handler.py

         self.assertNotEqual(account, None)
         self.assertEqual(account.user_email, None)
 
+        # set user email
+        account.user_email = 'mail2tw@example.com'
+        account.put()
+
         # try to change email with bad params
         data = {'email': 'mail2tw'}
         resp = app.post('/user/forward/email/edit', params=data)
         self.assertEqual('200 OK', resp.status)
-        self.assertEqual('mail2tw@example.com', resp.json['email'])
+        self.assertEqual('', resp.json['email'])
 
         account = model.Account.all().filter('twitter_id =', 'mail2tw').get()
         self.assertNotEqual(account, None)
 
         resp = app.post('/user/forward/email/edit')
         self.assertEqual('200 OK', resp.status)
-        self.assertEqual('mail2tw@example.com', resp.json['email'])
+        self.assertEqual('', resp.json['email'])
 
         account = model.Account.all().filter('twitter_id =', 'mail2tw').get()
         self.assertNotEqual(account, None)