mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
Remove reliance on django-markdownx (#3231)
* Remove reliance on django-markdownx - We are now rendering notes on the client side using easymde - No longer any need to utilize the markdownx integration - Adds character limit for notes fields` * Adjust legacy migrations - remove references to markdownx * Fix bug for company notes field
This commit is contained in:
@ -1305,6 +1305,22 @@ class PartDetailTests(InvenTreeAPITestCase):
|
||||
self.assertFalse('hello' in part.metadata)
|
||||
self.assertEqual(part.metadata['x'], 'y')
|
||||
|
||||
def test_part_notes(self):
|
||||
"""Unit tests for the part 'notes' field"""
|
||||
|
||||
# Ensure that we cannot upload a very long piece of text
|
||||
url = reverse('api-part-detail', kwargs={'pk': 1})
|
||||
|
||||
response = self.patch(
|
||||
url,
|
||||
{
|
||||
'notes': 'abcde' * 10001
|
||||
},
|
||||
expected_code=400
|
||||
)
|
||||
|
||||
self.assertIn('Ensure this field has no more than 50000 characters', str(response.data['notes']))
|
||||
|
||||
|
||||
class PartAPIAggregationTest(InvenTreeAPITestCase):
|
||||
"""Tests to ensure that the various aggregation annotations are working correctly..."""
|
||||
|
Reference in New Issue
Block a user