from django.test import TestCase

# Create your tests here.

@@ -30,31 +30,1463 @@
 ase%0A
-%0A# Create your tests here.
+from rest_framework.test import APIClient%0Afrom users.models import User%0A%0A%0A# Create your tests here.%0Aclass TokenLoginTestCase(TestCase):%0A    fixtures = %5B'users.json'%5D%0A%0A    def testAttemptSubmit(self):%0A        user = User.objects.get(username='matija')%0A        client = APIClient()%0A        client.credentials(HTTP_AUTHORIZATION='Token ' + user.auth_token.key)%0A        response = client.post('/api/attempts/submit/',%0A                               %5B%0A                                   %7B%0A                                       %22solution%22: %22%5Cndef linearna(a, b):%5C%5Cn    return -b / a%5C%5Cn%22,%0A                                       %22valid%22: True,%0A                                       %22feedback%22: %5B%22prvi%22, %22drugi feedbk%22%5D,%0A                                       %22secret%22: %5B%5D, %22part%22: 1%0A                                   %7D,%0A                                   %7B%0A                                       %22solution%22: %22%5C%5Cnimport math%5C%5Cn%5C%5Cndef ploscina(n, a):%5C%5Cn%22%0A                                                   %22return 0.25  a**2  n / math.tan(math.pi / n)%22,%0A                                       %22valid%22: True,%0A                                       %22feedback%22: %5B%5D,%0A                                       %22secret%22: %5B%5D,%0A                                       %22part%22: 2%0A                                   %7D%0A                               %5D,%0A                               format='json'%0A                               )%0A        self.assertEqual(response.status_code, 200)
 %0A

Add simple Attempt submit test