def test_explicit_name(self): Alphabet.objects.bulk_create([Alphabet(a=123), Alphabet(a=456)]) out = Alphabet.objects.all().aggregate(aaa=BitXor('a')) assert out == {'aaa': 435}
def test_explicit_name(self): Alphabet.objects.bulk_create([Alphabet(a=29), Alphabet(a=15)]) out = Alphabet.objects.all().aggregate(aaa=BitOr('a')) assert out == {'aaa': 31}
def test_implicit_name(self): Alphabet.objects.bulk_create([Alphabet(a=11), Alphabet(a=3)]) out = Alphabet.objects.all().aggregate(BitXor('a')) assert out == {'a__bitxor': 8}
def test_implicit_name(self): Alphabet.objects.bulk_create([Alphabet(a=29), Alphabet(a=15)]) out = Alphabet.objects.all().aggregate(BitAnd('a')) assert out == {'a__bitand': 13}