Beispiel #1
0
    def test_get_with_filters(self):
        """Testing LocalDataQuerySet.get with filters"""
        obj1 = Mock()
        obj1.a = 1

        obj2 = Mock()
        obj2.a = 2

        queryset = LocalDataQuerySet([obj1, obj2])

        self.assertEqual(queryset.get(a=1), obj1)
Beispiel #2
0
    def test_get_with_filters(self):
        """Testing LocalDataQuerySet.get with filters"""
        obj1 = Mock()
        obj1.a = 1

        obj2 = Mock()
        obj2.a = 2

        queryset = LocalDataQuerySet([obj1, obj2])

        self.assertEqual(queryset.get(a=1), obj1)
Beispiel #3
0
    def test_get(self):
        """Testing LocalDataQuerySet.get"""
        obj1 = Mock()
        queryset = LocalDataQuerySet([obj1])

        self.assertEqual(queryset.get(), obj1)
Beispiel #4
0
    def test_get(self):
        """Testing LocalDataQuerySet.get"""
        obj1 = Mock()
        queryset = LocalDataQuerySet([obj1])

        self.assertEqual(queryset.get(), obj1)