Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mertzjames opened this issue Dec 13, 2017 · 0 comments

Comments

@mertzjames
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant