def test_account_type_project(self): row = { 'PROJ_NO': '123-456', 'SECTOR': 'IT', 'PROJ_REQ': '0', 'LOCATION': 'FRANCE', 'PROJ_NAME1': 'Proj Proj', 'PCV_NAME': 'B. Smith', 'OVERS_PART': '' } self.assertEqual(Account.PROJECT, sync.account_type(row)) row = { 'PROJ_NO': '123-456-A', 'SECTOR': 'IT', 'PROJ_REQ': '0', 'LOCATION': 'FRANCE', 'PROJ_NAME1': 'Proj Proj', 'PCV_NAME': 'B. Smith', 'OVERS_PART': '123.45' } self.assertEqual(Account.PROJECT, sync.account_type(row)) row = { 'PROJ_NO': '123-456-A', 'SECTOR': 'IT', 'PROJ_REQ': '150', 'LOCATION': 'FRANCE', 'PROJ_NAME1': 'Proj Proj', 'PCV_NAME': 'B. Smith', 'OVERS_PART': '' } self.assertEqual(Account.PROJECT, sync.account_type(row))
def test_account_type_sector(self): row = {'PROJ_NO': 'SPF-YTH', 'SECTOR': 'Youth Development', 'PROJ_REQ': '2550', 'LOCATION': 'D/OSP/GGM', 'PROJ_NAME1': 'Youth Fund', 'PCV_NAME': 'The Youth Fund'} self.assertEqual(Account.SECTOR, sync.account_type(row)) row = {'PROJ_NO': 'SPF-YTH', 'SECTOR': 'Youth Development', 'PROJ_REQ': '2550', 'LOCATION': '', 'PROJ_NAME1': 'Youth Fund', 'PCV_NAME': 'YOUTH FUND'} self.assertEqual(Account.SECTOR, sync.account_type(row))
def test_account_type_country(self): row = {'PROJ_NO': '123-CFD'} self.assertEqual(Account.COUNTRY, sync.account_type(row)) row = { 'PROJ_NO': '111-222', 'SECTOR': 'None', 'PROJ_REQ': '0', 'LOCATION': 'RUSSIA', 'PCV_NAME': 'RUSSIA COUNTRY FUND' } self.assertEqual(Account.COUNTRY, sync.account_type(row))
def test_account_type_project(self): row = {'PROJ_NO': '123-456', 'SECTOR': 'IT', 'PROJ_REQ': '0', 'LOCATION': 'FRANCE', 'PROJ_NAME1': 'Proj Proj', 'PCV_NAME': 'B. Smith', 'OVERS_PART': ''} self.assertEqual(Account.PROJECT, sync.account_type(row)) row = {'PROJ_NO': '123-456-A', 'SECTOR': 'IT', 'PROJ_REQ': '0', 'LOCATION': 'FRANCE', 'PROJ_NAME1': 'Proj Proj', 'PCV_NAME': 'B. Smith', 'OVERS_PART': '123.45'} self.assertEqual(Account.PROJECT, sync.account_type(row)) row = {'PROJ_NO': '123-456-A', 'SECTOR': 'IT', 'PROJ_REQ': '150', 'LOCATION': 'FRANCE', 'PROJ_NAME1': 'Proj Proj', 'PCV_NAME': 'B. Smith', 'OVERS_PART': ''} self.assertEqual(Account.PROJECT, sync.account_type(row))
def test_account_type_memorial(self): row = { 'PROJ_NO': 'SPF-BOB', 'SECTOR': 'None', 'PROJ_REQ': '0', 'LOCATION': 'MOZAMBIQUE', 'PROJ_NAME1': 'Bob Jones Memorial Fund', 'PCV_NAME': 'BOB JONES MEMORIAL FUND' } self.assertEqual(Account.MEMORIAL, sync.account_type(row))
def test_account_type_general(self): row = { 'PROJ_NO': 'PCF-GEN', 'SECTOR': 'None', 'PROJ_REQ': '0', 'LOCATION': 'D/OSP/GGM', 'PROJ_NAME1': 'General Fund', 'PCV_NAME': 'General Fund', 'OVERS_PART': '' } self.assertEqual(Account.OTHER, sync.account_type(row))
def test_account_type_general(self): row = {'PROJ_NO': 'PCF-GEN', 'SECTOR': 'None', 'PROJ_REQ': '0', 'LOCATION': 'D/OSP/GGM', 'PROJ_NAME1': 'General Fund', 'PCV_NAME': 'General Fund', 'OVERS_PART': ''} self.assertEqual(Account.OTHER, sync.account_type(row))
def test_account_type_memorial(self): row = {'PROJ_NO': 'SPF-BOB', 'SECTOR': 'None', 'PROJ_REQ': '0', 'LOCATION': 'MOZAMBIQUE', 'PROJ_NAME1': 'Bob Jones Memorial Fund', 'PCV_NAME': 'BOB JONES MEMORIAL FUND'} self.assertEqual(Account.MEMORIAL, sync.account_type(row))
def test_account_type_country(self): row = {'PROJ_NO': '123-CFD'} self.assertEqual(Account.COUNTRY, sync.account_type(row)) row = {'PROJ_NO': '111-222', 'SECTOR': 'None', 'PROJ_REQ': '0', 'LOCATION': 'RUSSIA', 'PCV_NAME': 'RUSSIA COUNTRY FUND'} self.assertEqual(Account.COUNTRY, sync.account_type(row))