def test_app_configured_and_no_application_id_given_should_redirect(self):
        url = reverse('friendface.views.install')
        app = FacebookApplicationFactory.create(
            website_url=url.replace('install/', '')
        )
        res = self.client.get(url)

        self.assertEqual(res.status_code, 302)
        self.assertIn('app_id={0}'.format(app.pk), res.get('Location'))
def old_fixture_equivalent():
    return FacebookApplicationFactory.create(
        id=1,
        name='foo',
        secret='bar',
        namespace='mhe',
        canvas_url='http://testserver/',
        secure_canvas_url='https://testserver/',
        link=('http://www.facebook.com/apps/application.php?'
              'id=382752368461014')
    )
 def setUp(self):
     self.app = FacebookApplicationFactory.create(website_url='/dashboard/')