Ejemplo n.º 1
0
 def test_blogging_user(self):
     """A user with a blog can view their dash."""
     self.login('*****@*****.**', user_id='2')
     Blog.create(key_name='blog', owner='2', emailhash='#')
     response = self.client.get(reverse('dash'))
     self.assertEqual(200, response.status_code)
Ejemplo n.º 2
0
    def setUp(self):
        super(BlogVisibility, self).setUp()

        self.b1 = Blog.create(key_name='john', owner='1', emailhash='#')
        self.b2 = Blog.create(key_name='bob', owner='2', emailhash='#')
Ejemplo n.º 3
0
        def tx(url, user_id, email_hash):
            blog = Blog.get_by_key_name(url)
            if blog:
                raise forms.ValidationError("The chosen url is already taken")

            Blog.create(key_name=url, owner=user_id, emailhash=email_hash)