mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
Reverse lookup for company URL
- Added some simple tests
This commit is contained in:
@ -1,3 +1,19 @@
|
||||
# from django.test import TestCase
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
from .models import Company
|
||||
|
||||
|
||||
class CompanySimpleTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
Company.objects.create(name='ABC Co.',
|
||||
description='Seller of ABC products',
|
||||
website='www.abc-sales.com',
|
||||
address='123 Sales St.',
|
||||
is_customer=False,
|
||||
is_supplier=True)
|
||||
|
||||
def test_company_model(self):
|
||||
c = Company.objects.get(pk=1)
|
||||
self.assertEqual(c.name, 'ABC Co.')
|
||||
self.assertEqual(c.get_absolute_url(), '/company/1/')
|
Reference in New Issue
Block a user