CalPack
CalPack copied to clipboard
Create tests that check ArrayField cannot be manipulated in unwanted ways.
The ArrayField is like a list in python. However, it shouldn't be allowed to use the add and other things that makes a list more mutable than necessary for this Field. Update testing to make sure this is correct.
For examples:
class test_pkt(models.Packet):
a_field = models.ArrayField(models.IntField(), 10)
pkt = test_pkt()
pkt.a_field + [1, 2, 3, 4]
This example should raise an error.