Skip to content

Commit

Permalink
Merge pull request #22 from CIAT-DAPA/develop
Browse files Browse the repository at this point in the history
added array to model suscription
  • Loading branch information
CarlosNasayo authored Jan 15, 2024
2 parents 2bb8400 + 6e6bfd2 commit 2efec3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ormWP/models/suscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ class Suscription(Document):

userId = StringField(max_length=150, required=True)
boletin = EnumField(Boletin, required=True)
waterpoint = StringField(max_length=150, required=True)
waterpoint = ListField()
trace = DictField()
4 changes: 2 additions & 2 deletions src/tests/test_boletin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUp(self):
self.suscription = Suscription(
userId='sjcne92929',
boletin=Boletin.ALERT,
waterpoint='1828291jsjsj',
waterpoint=['1828291jsjsj'],
trace={"created": datetime.now(), "updated": datetime.now(), "enabled": True}
)

Expand All @@ -32,7 +32,7 @@ def test_create_suscription(self):
suscription = Suscription.objects(id=self.suscription.id).first()
self.assertEqual(suscription.userId, 'sjcne92929')
self.assertEqual(suscription.boletin, Boletin.ALERT)
self.assertEqual(suscription.waterpoint, '1828291jsjsj')
self.assertEqual(suscription.waterpoint, ['1828291jsjsj'])

if __name__ == '__main__':
unittest.main()

0 comments on commit 2efec3a

Please sign in to comment.