def METHOD_NAME(self):
    self.client.login(username='homer', password='doooh')
    response = self.client.post(reverse('apimobile:sync_mobiles_state'), data={})
    self.assertRedirects(response, '/login/?next=/api/mobile/commands/statesync/')