from django.test import TestCase

# Create your tests here.

import json

from django.test import TestCase, Client


class MemeTests(TestCase):

    def test_can_post_to_db(self):
        response = json.loads(self.client.post('/', {'url':'https://foo.bar/baz.gif', 'keywords':'omg, this, is, great'}).content)
        self.assertTrue(response['success'])



Add test for posting content to the server
Add test for posting content to the server

- from django.test import TestCase
+ import json
  
- # Create your tests here.
+ from django.test import TestCase, Client
  
+ 
+ class MemeTests(TestCase):
+ 
+     def test_can_post_to_db(self):
+         response = json.loads(self.client.post('/', {'url':'https://foo.bar/baz.gif', 'keywords':'omg, this, is, great'}).content)
+         self.assertTrue(response['success'])
+ 
+ 
+ 
Add test for posting content to the server
## Code Before:
from django.test import TestCase

# Create your tests here.

## Instruction:
Add test for posting content to the server
## Code After:
import json

from django.test import TestCase, Client


class MemeTests(TestCase):

    def test_can_post_to_db(self):
        response = json.loads(self.client.post('/', {'url':'https://foo.bar/baz.gif', 'keywords':'omg, this, is, great'}).content)
        self.assertTrue(response['success'])


