'The generate page should have a link to remind people to login
if they already have a codename, rather than create a new one.'

def test_generate_has_login_link(self):

    resp = self.client.get('/generate')
    self.assertIn('ALREADY    HAVE    A    CODENAME?', resp.data)
    soup = BeautifulSoup(resp.data, 'html.parser')
    already_have_codename_link = soup.select('a#already-have-codename')[0]
    self.assertEqual(already_have_codename_link['href'], '/login')
