# Path: lrs/models.py
# AGENT_PROFILE_UPLOAD_TO = "agent_profile"
# ACTIVITY_STATE_UPLOAD_TO = "activity_state"
# ACTIVITY_PROFILE_UPLOAD_TO = "activity_profile"
# STATEMENT_ATTACHMENT_UPLOAD_TO = "attachment_payloads"
# def attach_user(sender, **kwargs):
#     def return_verb_with_lang(self, lang=None, ids_only=False):
#     def get_a_name(self):
#     def __unicode__(self):
#     def retrieve(self, **kwargs):
#     def retrieve_or_create(self, **kwargs):
#     def retrieve_or_create_anonymous_group(self, member, kwargs):
#     def oauth_group(self, **kwargs):
#     def to_dict(self, ids_only=False):
#     def to_dict_person(self):
#     def get_a_name(self):
#     def get_user_from_oauth_group(self):
#     def __unicode__(self):
#     def return_activity_with_lang_format(self, lang=None, ids_only=False):
#     def get_a_name(self):
#     def __unicode__(self):
#     def to_dict(self, lang=None, ids_only=False):
#     def get_a_name(self):
#     def get_object(self):
#     def __unicode__(self):
#     def to_dict(self, lang=None, ret_format='exact'):
#     def get_a_name(self):
#     def get_object(self):
#     def __unicode__(self):
#     def get_available_name(self, name, max_length=None):
#     def _save(self, name, content, max_length=None):
#     def return_attachment_with_lang(self, lang=None):
#     def __unicode__(self):
#     def delete(self, *args, **kwargs):
#     def save(self, *args, **kwargs):
#     def delete(self, *args, **kwargs):
#     def save(self, *args, **kwargs):
#     def delete(self, *args, **kwargs):
#     def save(self, *args, **kwargs):
# class Verb(models.Model):
# class AgentManager(models.Manager):
# class Agent(models.Model):
#     class Meta:
# class Activity(models.Model):
# class SubStatement(models.Model):
# class Statement(models.Model):
# class AttachmentFileSystemStorage(FileSystemStorage):
# class StatementAttachment(models.Model):
# class ActivityState(models.Model):
# class ActivityProfile(models.Model):
# class AgentProfile(models.Model):
# 
# Path: adl_lrs/views.py
# @csrf_protect
# @require_http_methods(["POST", "GET"])
# def register(request):
#     if request.method == 'GET':
#         form = RegisterForm()
#         return render(request, 'register.html', {"form": form})
#     elif request.method == 'POST':
#         form = RegisterForm(request.POST)
#         if form.is_valid():
#             name = form.cleaned_data['username']
#             pword = form.cleaned_data['password']
#             email = form.cleaned_data['email']
# 
#             # If username doesn't already exist
#             if not User.objects.filter(username__exact=name).count():
#                 # if email doesn't already exist
#                 if not User.objects.filter(email__exact=email).count():
#                     User.objects.create_user(name, email, pword)
#                 else:
#                     return render(request, 'register.html', {"form": form, "error_message": "Email %s is already registered." % email})
#             else:
#                 return render(request, 'register.html', {"form": form, "error_message": "User %s already exists." % name})
# 
#             # If a user is already logged in, log them out
#             if request.user.is_authenticated:
#                 logout(request)
# 
#             new_user = authenticate(username=name, password=pword)
#             login(request, new_user)
#             return HttpResponseRedirect(reverse('home'))
#         else:
#             return render(request, 'register.html', {"form": form})


import ast
import json
import hashlib
import urllib.request, urllib.parse, urllib.error
import base64
        import ast
        import ast
from django.test import TestCase
from django.conf import settings
from django.urls import reverse
from lrs import models
from adl_lrs.views import register





class ActivityProfileTests(TestCase):
    test_activityId1 = 'act:act-1'
    test_activityId2 = 'act:act-2'
    test_activityId3 = 'act:act-3'
    other_activityId = 'act:act-other'
    content_type = "application/json"
    testprofileId1 = "http://profile.test.id/test/1"
    testprofileId2 = "http://profile.test.id/test/2"
    testprofileId3 = "http://profile.test.id/test/3"
    otherprofileId1 = "http://profile.test.id/other/1"

    @classmethod
    def setUpClass(cls):
        print("\n%s" % __name__)
        super(ActivityProfileTests, cls).setUpClass()

    def setUp(self):
        self.username = "tester"
        self.email = "test@tester.com"
        self.password = "test"
        self.auth = "Basic %s" % base64.b64encode(
            "%s:%s" % (self.username, self.password))
        form = {'username': self.username, 'email': self.email,
                'password': self.password, 'password2': self.password}

# Path: lrs/models.py
# AGENT_PROFILE_UPLOAD_TO = "agent_profile"
# ACTIVITY_STATE_UPLOAD_TO = "activity_state"
# ACTIVITY_PROFILE_UPLOAD_TO = "activity_profile"
# STATEMENT_ATTACHMENT_UPLOAD_TO = "attachment_payloads"
# def attach_user(sender, **kwargs):
#     def return_verb_with_lang(self, lang=None, ids_only=False):
#     def get_a_name(self):
#     def __unicode__(self):
#     def retrieve(self, **kwargs):
#     def retrieve_or_create(self, **kwargs):
#     def retrieve_or_create_anonymous_group(self, member, kwargs):
#     def oauth_group(self, **kwargs):
#     def to_dict(self, ids_only=False):
#     def to_dict_person(self):
#     def get_a_name(self):
#     def get_user_from_oauth_group(self):
#     def __unicode__(self):
#     def return_activity_with_lang_format(self, lang=None, ids_only=False):
#     def get_a_name(self):
#     def __unicode__(self):
#     def to_dict(self, lang=None, ids_only=False):
#     def get_a_name(self):
#     def get_object(self):
#     def __unicode__(self):
#     def to_dict(self, lang=None, ret_format='exact'):
#     def get_a_name(self):
#     def get_object(self):
#     def __unicode__(self):
#     def get_available_name(self, name, max_length=None):
#     def _save(self, name, content, max_length=None):
#     def return_attachment_with_lang(self, lang=None):
#     def __unicode__(self):
#     def delete(self, *args, **kwargs):
#     def save(self, *args, **kwargs):
#     def delete(self, *args, **kwargs):
#     def save(self, *args, **kwargs):
#     def delete(self, *args, **kwargs):
#     def save(self, *args, **kwargs):
# class Verb(models.Model):
# class AgentManager(models.Manager):
# class Agent(models.Model):
#     class Meta:
# class Activity(models.Model):
# class SubStatement(models.Model):
# class Statement(models.Model):
# class AttachmentFileSystemStorage(FileSystemStorage):
# class StatementAttachment(models.Model):
# class ActivityState(models.Model):
# class ActivityProfile(models.Model):
# class AgentProfile(models.Model):
# 
# Path: adl_lrs/views.py
# @csrf_protect
# @require_http_methods(["POST", "GET"])
# def register(request):
#     if request.method == 'GET':
#         form = RegisterForm()
#         return render(request, 'register.html', {"form": form})
#     elif request.method == 'POST':
#         form = RegisterForm(request.POST)
#         if form.is_valid():
#             name = form.cleaned_data['username']
#             pword = form.cleaned_data['password']
#             email = form.cleaned_data['email']
# 
#             # If username doesn't already exist
#             if not User.objects.filter(username__exact=name).count():
#                 # if email doesn't already exist
#                 if not User.objects.filter(email__exact=email).count():
#                     User.objects.create_user(name, email, pword)
#                 else:
#                     return render(request, 'register.html', {"form": form, "error_message": "Email %s is already registered." % email})
#             else:
#                 return render(request, 'register.html', {"form": form, "error_message": "User %s already exists." % name})
# 
#             # If a user is already logged in, log them out
#             if request.user.is_authenticated:
#                 logout(request)
# 
#             new_user = authenticate(username=name, password=pword)
#             login(request, new_user)
#             return HttpResponseRedirect(reverse('home'))
#         else:
#             return render(request, 'register.html', {"form": form})


# Path: lrs/tests/test_ActivityProfile.py
import ast
import json
import hashlib
import urllib.request, urllib.parse, urllib.error
import base64
        import ast
        import ast
from django.test import TestCase
from django.conf import settings
from django.urls import reverse
from lrs import models
from adl_lrs.views import register






class ActivityProfileTests(TestCase):
    test_activityId1 = 'act:act-1'
    test_activityId2 = 'act:act-2'
    test_activityId3 = 'act:act-3'
    other_activityId = 'act:act-other'
    content_type = "application/json"
    testprofileId1 = "http://profile.test.id/test/1"
    testprofileId2 = "http://profile.test.id/test/2"
    testprofileId3 = "http://profile.test.id/test/3"
    otherprofileId1 = "http://profile.test.id/other/1"

    @classmethod
    def setUpClass(cls):
        print("\n%s" % __name__)
        super(ActivityProfileTests, cls).setUpClass()

    def setUp(self):
        self.username = "tester"
        self.email = "test@tester.com"
        self.password = "test"
        self.auth = "Basic %s" % base64.b64encode(
            "%s:%s" % (self.username, self.password))
        form = {'username': self.username, 'email': self.email,
                'password': self.password, 'password2': self.password}

        self.client.post(reverse(register), form,