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
change quantity to DecimalType #21
change quantity to DecimalType #21
Conversation
openregistry/api/tests/models.py
Outdated
@@ -263,7 +263,7 @@ def test_Item_model(self): | |||
"name": u"item", | |||
"code": u"39513200-3" | |||
}, | |||
"quantity": 5, | |||
"quantity": u'0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Додав функціональність Decimal, а тестуєш 0?
prozorro-sale/openprocurement.api@f526a4f#diff-351c2e47636703a5ac5e7bf20fcee615R1006 |
15cde98
to
bd084ee
Compare
bd084ee
to
0793c17
Compare
0793c17
to
2f6179c
Compare
openregistry/api/tests/models.py
Outdated
self.assertEqual(Decimal('0.556'), dt.to_native('0.55555')) | ||
|
||
for number in ('-1.0', '11.0'): | ||
with self.assertRaises(ConversionError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут треба assertRaisesRegexp
No description provided.