def setUp(self):
     super(CourseResourceTest, self).setUp()
     user = User.objects.get(username='******')
     admin = User.objects.get(username='******')
     self.auth_data = {
         'username': '******',
         'api_key': get_api_key(user=user).key,
     }
     self.admin_auth = {
         'username': '******',
         'api_key': get_api_key(user=admin).key
     }
     self.url = get_api_url('course')
示例#2
0
 def setUp(self):
     super(CourseResourceTest, self).setUp()
     user = User.objects.get(username='******')
     admin = User.objects.get(username='******')
     self.auth_data = {
         'username': '******',
         'api_key': get_api_key(user=user).key,
     }
     self.admin_auth = {
         'username': '******',
         'api_key': get_api_key(user=admin).key
     }
     self.url = get_api_url('course')
示例#3
0
 def setUp(self):
     super(PointsResourceTest, self).setUp()
     self.username = '******'
     user = User.objects.get(username='******')
     api_key = get_api_key(user=user)
     self.api_key = api_key.key
     self.url = get_api_url('points')
示例#4
0
 def setUp(self):
     super(TrackerResourceTest, self).setUp()
     self.username = '******'
     user = User.objects.get(username=self.username)
     api_key = get_api_key(user=user)
     self.api_key = api_key.key
     self.url = get_api_url('tracker')
示例#5
0
 def setUp(self):
     super(QuizAttemptResourceTest, self).setUp()
     self.username = '******'
     user = User.objects.get(username=self.username)
     api_key = get_api_key(user)
     self.api_key = api_key.key
     self.url = get_api_url('quizattempt')
 def setUp(self):
     super(PointsResourceTest, self).setUp()
     self.username = '******'
     user = User.objects.get(username='******')
     api_key = get_api_key(user=user)
     self.api_key = api_key.key
     self.url = get_api_url('points')
 def setUp(self):
     super(QuizAttemptResourceTest, self).setUp()
     self.username = '******'
     user = User.objects.get(username=self.username)
     api_key = get_api_key(user)
     self.api_key = api_key.key
     self.url = get_api_url('quizattempt')
 def setUp(self):
     super(TrackerResourceTest, self).setUp()
     self.username = '******'
     user = User.objects.get(username=self.username)
     api_key = get_api_key(user=user)
     self.api_key = api_key.key
     self.url = get_api_url('tracker')
示例#9
0
 def setUp(self):
     super(AwardsResourceTest, self).setUp()
     user = User.objects.get(username='******')
     api_key = get_api_key(user=user)
     self.auth_data = {
         'username': '******',
         'api_key': api_key.key,
     }
     self.url = get_api_url('awards')
 def setUp(self):
     super(TagResourceTest, self).setUp()
     user = User.objects.get(username='******')
     api_key = get_api_key(user=user)
     self.auth_data = {
         'username': '******',
         'api_key': api_key.key,
     }
     self.url = get_api_url('tag')
示例#11
0
 def setUp(self):
     super(UserResourceTest, self).setUp()
     self.url = '/api/v1/user/'
     user = User.objects.get(username='******')
     self.valid_api_key = get_api_key(user=user)