示例#1
0
 def test_400_when_waffle_is_on(self):
     create_switch('fxa-auth', active=True)
     response = self.client.post(self.url)
     assert response.status_code == 400
示例#2
0
 def setUp(self):
     self.url = reverse('accounts.login')
     create_switch('fxa-auth', active=True)
     patcher = mock.patch('accounts.views.verify.fxa_identify')
     self.fxa_identify = patcher.start()
     self.addCleanup(patcher.stop)
示例#3
0
 def setUp(self):
     self.url = reverse(self.view_name)
     create_switch('fxa-auth', active=True)
     self.fxa_identify = self.patch('accounts.views.verify.fxa_identify')
示例#4
0
 def test_register_404_when_waffle_is_off(self):
     create_switch('fxa-auth', active=False)
     response = self.client.post(self.register_url)
     assert response.status_code == 404
示例#5
0
 def test_login_404_when_waffle_is_off(self):
     create_switch('fxa-auth', active=False)
     response = self.client.post(self.login_url)
     assert response.status_code == 404
示例#6
0
 def test_register_422_when_waffle_is_on(self):
     create_switch('fxa-auth', active=True)
     response = self.client.post(self.register_url)
     assert response.status_code == 422
示例#7
0
 def setUp(self):
     self.url = reverse(self.view_name)
     create_switch('fxa-auth', active=True)
     self.fxa_identify = self.patch('accounts.views.verify.fxa_identify')
示例#8
0
 def setUp(self):
     create_switch('fxa-auth', active=True)
示例#9
0
 def test_source_200_when_waffle_is_on(self):
     create_switch('fxa-auth', active=True)
     response = self.client.get(self.source_url)
     assert response.status_code == 200
示例#10
0
 def test_source_404_when_waffle_is_off(self):
     create_switch('fxa-auth', active=False)
     response = self.client.get(self.source_url)
     assert response.status_code == 404
示例#11
0
 def setUp(self):
     self.url = reverse('accounts.login')
     create_switch('fxa-auth', active=True)
     patcher = mock.patch('accounts.views.verify.fxa_identify')
     self.fxa_identify = patcher.start()
     self.addCleanup(patcher.stop)