def setUp(self):
        a = collection.CollectionMixins()
        kind = choices.MOVIE
        tag = 'xxx'
        path = 'Videos/movies-x'
        album, artist = a.add_members(path, 1, kind, tag)
        rf = db.Movie.objects.get(title__icontains='apocalypse')

        self.valid_payload = {
            'year': rf.year,
            'title': rf.title,
            'slug': 'a_slug',
            'fileName': rf.fileName,
            #'collection': album # todo figure out nested
        }
        self.invalid_payload = {
            'year': 'not a valid year',
            'title': rf.title,
            'slug': 'b_slug',
            'fileName': rf.fileName,
            #'collection': album # todo figure out nested
        }
        self.invalid_payload1 = {
            'year': rf.year,
            'title': 'title',
            'slug': rf.slug,  # error not unique
            'fileName': rf.fileName,
            #'collection': album # todo figure out nested
        }
Example #2
0
    def setUp(self):
        a = collection.CollectionMixins()
        kind = choices.MOVIE
        tag = 'xxx'
        path = 'picturesbackup/win2001'
        album, artist = a.add_members(path, 2, kind, tag)
        rf = db.Picture.objects.get(title__icontains='capture')

        self.valid_payload = {
            'year': rf.year,
            'title': rf.title,
            'slug': 'a_slug',
            'fileName': rf.fileName,
            #'collection': album # todo figure out nested
        }
        self.invalid_payload = {
            'year': 'a_a',  # error not valid year
            'title': rf.title,
            'slug': 'b_slug',
            'fileName': rf.fileName,
            #'collection': album # todo figure out nested
        }
        self.invalid_payload1 = {
            'year': rf.year,
            'title': 'title',
            'slug': rf.slug,  # error not unique
            'fileName': rf.fileName,
            #'collection': album # todo figure out nested
        }
Example #3
0
    def setUp(self):
        self.user = db.User.objects.create(username='******',
            password='******',is_staff=True)
        client.login(username='******',password='******')
        a = collection.CollectionMixins()
        kind = choices.SONG
        tag = 'abc'
        path = 'mp3s/Duffy'
        album, artist = a.add_members(path,2,kind,tag)
        rf = db.Song.objects.get(title__icontains='mercy')

        self.valid_payload = {
            'year': rf.year,
            'title': rf.title,
            'slug': 'a_slug',
            'fileName': rf.fileName,
            'track': rf.track,
            #'collection': album # todo figure out nested
        }    
        self.invalid_payload = {
            'year': rf.year,
            'title': rf.title,
            'slug': 'b_slug',
            'fileName': rf.fileName, 
            'track': 'a__a__a', # not valid integer
            #'collection': album # todo figure out nested
        }    
        self.invalid_payload1 = {
            'year': rf.year,
            'title': 'title',
            'slug': rf.slug, # error not unique
            'fileName': rf.fileName, 
            'track': rf.track,
            #'collection': album # todo figure out nested
        }    
Example #4
0
 def setUp(self):
     self.user = db.User.objects.create(username='******',
         password='******',is_staff=True)
     client.login(username='******',password='******')
     a = collection.CollectionMixins()
     kind = choices.SONG
     tag = 'abc'
     path = 'mp3s/Duffy'
     album, artist = a.add_members(path,2,kind,tag)
    def setUp(self):
        a = collection.CollectionMixins()
        kind = choices.MOVIE
        tag = 'xxx'
        path = 'Videos/movies-x'
        album, artist = a.add_members(path, 1, kind, tag)
        self.rf = db.Movie.objects.get(title__icontains='apocalypse')

        self.valid_payload = {
            'year': '1994',
            'title': self.rf.title,
            'slug': 'a_slug',
            'fileName': self.rf.fileName,
        }
        self.invalid_payload = {
            'year': 'not valid year',
            'title': self.rf.title,
            'slug': 'b_slug',
            'fileName': self.rf.fileName,
        }
Example #6
0
    def setUp(self):
        a = collection.CollectionMixins()
        kind = choices.MOVIE
        tag = 'xxx'
        path = 'picturesbackup/win2001'
        album, artist = a.add_members(path, 2, kind, tag)
        self.rf = db.Picture.objects.get(title__icontains='capture')

        self.valid_payload = {
            'year': '1994',
            'title': self.rf.title,
            'slug': 'a_slug',
            'fileName': self.rf.fileName,
        }
        self.invalid_payload = {
            'year': 'a_a',  # not valid picture
            'title': self.rf.title,
            'slug': 'b_slug',
            'fileName': self.rf.fileName,
        }
 def setUp(self):
     a = collection.CollectionMixins()
     kind = choices.MOVIE
     tag = 'xxx'
     path = 'Videos/movies-x'
     album, artist = a.add_members(path, 1, kind, tag)
Example #8
0
 def setUp(self):
     a = collection.CollectionMixins()
     kind = choices.MOVIE
     tag = 'xxx'
     path = 'picturesbackup/win2001'
     album, artist = a.add_members(path, 2, kind, tag)