Exemplo n.º 1
0
 def test_valid_uppercase_country(self, uum_mock):
     req = self.rf.post('/', {'country': 'GB'})
     resp = views.user_meta(req, 'the-dudes-token-man')
     assert resp.status_code == 200
     uum_mock.delay.assert_called_with('the-dudes-token-man', {
         'country': 'gb',
         '_set_subscriber': False,
     })
Exemplo n.º 2
0
 def test_only_send_given_values(self, uum_mock):
     req = self.rf.post('/', {'first_name': 'The', 'last_name': 'Dude'})
     resp = views.user_meta(req, 'the-dudes-token-man')
     assert resp.status_code == 200
     uum_mock.delay.assert_called_with('the-dudes-token-man', {
         'first_name': 'The',
         'last_name': 'Dude',
         '_set_subscriber': False,
     })
Exemplo n.º 3
0
 def test_invalid_data(self, uum_mock):
     req = self.rf.post('/', {'country': 'dude'})
     resp = views.user_meta(req, 'the-dudes-token-man')
     assert resp.status_code == 400
     uum_mock.delay.assert_not_called()