Ejemplo n.º 1
0
    def setUp(self):
        userdata = {
            'username': '******',
            'first_name': 'Bob',
            'last_name': 'Tremblay',
            'email': '*****@*****.**'
        }

        self.user_test = User(**userdata)
        self.user_test.save()

        teamhierarchydata = {
            'code': 'SomeValue',
            'description': 'Description of TeamHierarchy',
            'parentNode': None,
            'site': Site()
        }

        self.teamHierarchy = TeamHierarchy(**teamhierarchydata)
        self.teamHierarchy.save()

        usersharedata = {
            'user': self.user_test,
            'userTeam': self.teamHierarchy
        }

        self.userShare = UserShare(**usersharedata)
        self.userShare.save()
Ejemplo n.º 2
0
    def setUp(self):
        userdata = {
            'username': '******',
            'first_name': 'Bob',
            'last_name': 'Tremblay',
            'email': '*****@*****.**',
        }

        self.user_test = User(**userdata)
        self.user_test.save()

        entry = User.objects.get(id=self.user_test.id)
        self.userProfile = UserProfile.objects.get(id=entry.id)