class CommentPinTest(TestCase): fixtures = ['user.json', 'member.json', 'pins.json'] def setUp(self): self.client = TestClient() self.client = TestClient() self.user = User.objects.get(username='******') self.member = self.user.get_profile() self.client.login_user(self.user) def test_get_comments_for_pin(self): res = self.client.get('/api/pin/%s/comment/') self.assertEquals(200, res.status_code) def test_create_comment_on_pin(self): pass
class TestBaseAPI(TestCase): fixtures = ['user.json', 'member.json', 'pins.json'] def setUp(self): self.client = TestClient() self.user = User.objects.get(username='******') self.member = self.user.get_profile() self.client.login_user(self.user) def count_pins(self, member): return Pin.objects.filter(submitter=member).count() def create_new_pin(self, member): return Pin.objects.create( submitter=member, url='', image='test.jpg', thumbnail='test_thumb.jpg')
class TestRecentPins(TestCase): def setUp(self): self.client = TestClient() self.url = '/api/pin/?format=json' def test_status_code(self): response = self.client.get(self.url) self.assertEqual(response.status_code, 200) def test_delete_pin(self): pass def test_get_list_pins(self): pass def test_get_pin(self): pass
def setUp(self): self.client = TestClient() self.url = '/api/pin/?format=json'
def setUp(self): self.client = TestClient() self.client = TestClient() self.user = User.objects.get(username='******') self.member = self.user.get_profile() self.client.login_user(self.user)