def test_username_does_exist(self):
        chirper = ChirperUser.signup('Nate', 'natec425', '*****@*****.**',
                                     'badpass')

        self.assertTrue(ChirperUser.username_exists('natec425'))
        self.assertFalse(ChirperUser.username_exists('notnate'))
def username_exists(request, username):
    return JsonResponse({'exists': ChirperUser.username_exists(username)})