@@ -83,11 +83,13 @@ def test_fields(self):
8383 'hmac_with_original_field' ,
8484 'email_pgp_pub_field' ,
8585 'integer_pgp_pub_field' ,
86+ 'biginteger_pgp_pub_field' ,
8687 'pgp_pub_field' ,
8788 'char_pub_field' ,
8889 'decimal_pgp_pub_field' ,
8990 'email_pgp_sym_field' ,
9091 'integer_pgp_sym_field' ,
92+ 'biginteger_pgp_sym_field' ,
9193 'pgp_sym_field' ,
9294 'char_sym_field' ,
9395 'date_pgp_sym_field' ,
@@ -113,12 +115,14 @@ def test_value_returned_is_not_bytea(self):
113115
114116 self .assertIsInstance (instance .email_pgp_pub_field , str )
115117 self .assertIsInstance (instance .integer_pgp_pub_field , int )
118+ self .assertIsInstance (instance .biginteger_pgp_pub_field , int )
116119 self .assertIsInstance (instance .pgp_pub_field , str )
117120 self .assertIsInstance (instance .date_pgp_pub_field , date )
118121 self .assertIsInstance (instance .datetime_pgp_pub_field , datetime )
119122
120123 self .assertIsInstance (instance .email_pgp_sym_field , str )
121124 self .assertIsInstance (instance .integer_pgp_sym_field , int )
125+ self .assertIsInstance (instance .biginteger_pgp_sym_field , int )
122126 self .assertIsInstance (instance .pgp_sym_field , str )
123127 self .assertIsInstance (instance .date_pgp_sym_field , date )
124128 self .assertIsInstance (instance .datetime_pgp_sym_field , datetime )
@@ -311,19 +315,39 @@ def test_update_one_attribute(self):
311315 self .assertEqual (updated_instance .first (), instance )
312316
313317 def test_pgp_public_key_negative_number (self ):
314- """Assert negative value is saved with an `IntegerPGPPublicKeyField` field."""
315- expected = - 1
318+ """
319+ Assert negative value is saved with Public Key integer fields.
320+
321+ * `IntegerPGPPublicKeyField`
322+ * `BigIntegerPGPSymmetricKeyField`
323+ """
324+ expected = - 2147483648
316325 instance = EncryptedModelFactory .create (integer_pgp_pub_field = expected )
317326
318327 self .assertEqual (instance .integer_pgp_pub_field , expected )
319328
329+ expected = - 9223372036854775808
330+ instance = EncryptedModelFactory .create (biginteger_pgp_pub_field = expected )
331+
332+ self .assertEqual (instance .biginteger_pgp_pub_field , expected )
333+
320334 def test_pgp_symmetric_key_negative_number (self ):
321- """Assert negative value is saved with an `IntegerPGPSymmetricKeyField` field."""
322- expected = - 1
335+ """
336+ Assert negative value is saved with Symmetric Key fields.
337+
338+ * `IntegerPGPSymmetricKeyField`
339+ * `BigIntegerPGPSymmetricKeyField`
340+ """
341+ expected = - 2147483648
323342 instance = EncryptedModelFactory .create (integer_pgp_sym_field = expected )
324343
325344 self .assertEqual (instance .integer_pgp_sym_field , expected )
326345
346+ expected = - 9223372036854775808
347+ instance = EncryptedModelFactory .create (biginteger_pgp_sym_field = expected )
348+
349+ self .assertEqual (instance .biginteger_pgp_sym_field , expected )
350+
327351 def test_pgp_symmetric_key_date (self ):
328352 """Assert date is save with an `DatePGPSymmetricKeyField` field."""
329353 expected = date .today ()
0 commit comments