Beispiel #1
0
    def test_ceiling(self):
        Alphabet.objects.create(g=0.5)

        with self.assertWarnsMessage(DeprecationWarning,
                                     "This function is deprecated."):
            gceil = Ceiling("g")
        ab = Alphabet.objects.annotate(gceil=gceil).first()

        assert ab.gceil == 1
Beispiel #2
0
 def test_ceiling(self):
     Alphabet.objects.create(g=0.5)
     ab = Alphabet.objects.annotate(gceil=Ceiling('g')).first()
     assert ab.gceil == 1