CalPack icon indicating copy to clipboard operation
CalPack copied to clipboard

Create tests that check ArrayField cannot be manipulated in unwanted ways.

Open mertzjames opened this issue 7 years ago • 0 comments

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.

mertzjames avatar Dec 13 '17 06:12 mertzjames