コード例 #1
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')
コード例 #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
ファイル: test_points.py プロジェクト: rbenlizar/django-oppia
 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')
コード例 #6
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')
コード例 #7
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')
コード例 #8
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')
コード例 #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')
コード例 #10
0
 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
ファイル: test_user.py プロジェクト: rbenlizar/django-oppia
 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)