def test_model_create_duplicate_company_should_return_duplicate_exception(self):
        guid = uuid.uuid4().hex
        from amspApp.amspUser.models import MyUser

        newUser = MyUser(
            username=guid + "test1",
            email=guid + "*****@*****.**",
            password=guid + "test1",
        )
        newUser.save()
        # user created
        # creating new company from model
        from amspApp.CompaniesManagment.models import Company

        newCompany = Company(
            owner_user=newUser,
            name="Hellow" + guid
        )
        newCompany.save()

        newCompany2 = Company(
            owner_user=newUser,
            name="Hellow" + guid
        )
        from django.core.exceptions import ValidationError

        self.assertRaises(newCompany2.save(), ValidationError)
    def test_model_create_company_should_return(self):
        guid = uuid.uuid4().hex
        from amspApp.amspUser.models import MyUser

        newUser = MyUser(
            username=guid + "test1",
            email=guid + "*****@*****.**",
            password=guid + "test1",
        )
        newUser.save()
        # user created
        # creating new company from model
        from amspApp.CompaniesManagment.models import Company

        newCompany = Company(
            owner_user=newUser,
            name="Hellow" + guid
        )
        newCompany.save()
        self.assertIsNotNone(newCompany.id)