Ejemplo n.º 1
0
    def test_pkMovie_getMovieNonePK_MoviesNotExists(self):
        scope = Movie.object.order_by("-created_date")
        pk = None
        movies = MovieQuery.pkMovie(scope, pk)

        result = []
        self.assertEquals(movies, result)
Ejemplo n.º 2
0
    def test_pkMovie_getMovieNoneScope_MoviesNotExists(self):
        scope = None
        pk = 1
        movies = MovieQuery.pkMovie(scope, pk)

        result = []
        self.assertEquals(movies, result)
Ejemplo n.º 3
0
    def test_pkMovie_getMovieCorrectPK_MovieCorrect(self):
        scope = Movie.object.order_by("-created_date")
        pk = 1
        movies = MovieQuery.pkMovie(scope, pk)

        result = Movie.object.get(pk=1)
        self.assertEquals(movies, result)