'Verify we switch to https when sample is active.'

@mock.patch.object(Site.objects, 'get_current')
@mock.patch.object(waffle, 'sample_is_active')
def test_switch_to_https(self, sample_is_active, get_current):

    get_current.return_value.domain = 'example.com'
    sample_is_active.return_value = True
    response = self.client.get(u'/1/firefox/4.0/Linux/en-US/prefs-applications')
    eq_(302, response.status_code)
    assert response['location'].startswith('https://example.com/')
