def step(context, nino):
    add_rp14a_form({
        "employee_national_insurance_number": nino,
        "employee_date_of_birth": date(2013, 1, 1),
        "employee_title": "Mr",
        "employee_forenames": "Donald",
        "employee_surname": "Duck",
        "employer_name": "Duck Enterprises",
    })
def step(context, nino):
    add_rp14a_form({
        "employee_national_insurance_number": nino,
        "employee_date_of_birth": date(2013, 1, 1),
        "employee_title": "Mr",
        "employee_forenames": "Donald",
        "employee_surname": "Duck",
        "employer_name": "Duck Enterprises",
    })
 def setUp(self):
     add_rp14a_form({
         'employee_national_insurance_number': 'XX223344X',
         'employee_date_of_birth': '01/01/1990',
         'employee_title': 'Mr',
         'employee_surname': 'SURNAME',
         'employee_forenames': 'FORENAMES',
         'employer_name': 'Widgets Inc',
         'employee_basic_weekly_pay': Decimal('300.5'),
         'employee_owed_wages_in_arrears': Decimal('50')
     })
Example #4
0
 def test_ninos_are_case_insensitive(self):
     employee_dict = {
         "employee_national_insurance_number": 'AB123456C',
         "employee_date_of_birth": "2012/1/1",
         "employee_title": "Mr",
         "employee_forenames": "Donald Duck",
         "employee_surname": "Quack",
         "employer_name": "McDuck Enterprises"
     }
     add_rp14a_form(employee_dict)
     employee = employee_via_nino('ab123456c')
     assert_that(employee, is_(employee_dict))
def step(context):
    context.form = {
        #"ip_number": "9314",  TODO: see api.py
        "employee_telephone_number": "0121 123 4567",
        'employee_forenames': 'Donald',
        'employee_surname': 'Duck',
        'employee_title': 'Mr',
        'employee_date_of_birth': '01/01/1900',
        'employee_national_insurance_number': 'AA112233B',
        "employer_name": "Mickey Mouse Enterprises",
    }
    add_rp14a_form(context.form)
def step(context):
    context.form = {
        #"ip_number": "9314",  TODO: see api.py
        "employee_telephone_number": "0121 123 4567",
        'employee_forenames': 'Donald',
        'employee_surname': 'Duck',
        'employee_title': 'Mr',
        'employee_date_of_birth': '01/01/1900',
        'employee_national_insurance_number': 'AA112233B',
        "employer_name": "Mickey Mouse Enterprises",
    }
    add_rp14a_form(context.form)
 def setUp(self):
     add_rp14a_form(
         {
             'employee_national_insurance_number': 'XX223344X',
             'employee_date_of_birth': '01/01/1990',
             'employee_title': 'Mr',
             'employee_surname': 'SURNAME',
             'employee_forenames': 'FORENAMES',
             'employer_name': 'Widgets Inc',
             'employee_basic_weekly_pay': Decimal('300.5'),
             'employee_owed_wages_in_arrears': Decimal('50')
         }
     )
Example #8
0
 def test_employee_via_nino(self):
     nino = "AB123456C"
     employee_dict = {
         "employee_national_insurance_number": nino,
         "employee_date_of_birth": "2012/1/1",
         "employee_title": "Mr",
         "employee_forenames": "Donald Duck",
         "employee_surname": "Quack",
         "employer_name": "McDuck Enterprises"
     }
     add_rp14a_form(employee_dict)
     employee = employee_via_nino(nino)
     assert_that(employee, is_(employee_dict))
Example #9
0
 def test_employee_via_nino(self):
     nino = "AB123456C"
     employee_dict = {
         "employee_national_insurance_number": nino,
         "employee_date_of_birth": "2012/1/1",
         "employee_title": "Mr",
         "employee_forenames": "Donald Duck",
         "employee_surname": "Quack",
         "employer_name": "McDuck Enterprises"
     }
     add_rp14a_form(employee_dict)
     employee = employee_via_nino(nino)
     assert_that(employee, is_(employee_dict))
def step(context):
    rp14a = {
        "employee_national_insurance_number": "AB123456Z",
        "employee_date_of_birth": "01/01/1900",
        "employee_title": "Mr",
        "employee_forenames": "John",
        "employee_surname": "Smith",
        "ip_number": "0000",
        "employer_name": "Widgets Co",
        "employee_basic_weekly_pay": "550"
    }
    add_rp14a_form(rp14a)
    personal_details = {"nino": "AB123456Z"}
    context.claim_id = create_claim_2(personal_details)
def impl(context):
    rp14a = {
        "employee_national_insurance_number": "AB111111C",
        "employee_date_of_birth": "01/01/1900",
        "employee_title": "Mr",
        "employee_forenames": "John",
        "employee_surname": "Smith",
        "ip_number": "0000",
        "employer_name": "Widgets Co",
        "employee_basic_weekly_pay": "550"
    }
    add_rp14a_form(rp14a)
    personal_details = {"nino": "AB111111C"}
    claim_id = create_claim_2(personal_details)
    submit(claim_id)
    def test_should_redirect_when_claims(self):
        add_rp14a_form({
            "employee_national_insurance_number": "foobar",
            "employee_date_of_birth": "01/10/2003",
            "employee_title": "Ms",
            "employee_forenames": "Boo",
            "employee_surname": "Boo",
            "employer_name": "Boo"
        })
        claim_service_api.create_claim_2({"nino": "foobar"})

        test_client = chomp_app.test_client()

        no_claims_response = test_client.get("/chomp/next")

        assert_that(no_claims_response.status_code, is_(303))
Example #13
0
    def test_should_redirect_when_claims(self):
        add_rp14a_form(
            {
            "employee_national_insurance_number": "foobar",
            "employee_date_of_birth": "01/10/2003",
            "employee_title" : "Ms",
            "employee_forenames" : "Boo",
            "employee_surname" : "Boo",
            "employer_name" : "Boo"
           }
        )
        claim_service_api.create_claim_2(
            {"nino": "foobar"}
        )

        test_client = chomp_app.test_client()

        no_claims_response = test_client.get("/chomp/next")

        assert_that(no_claims_response.status_code, is_(303))
def step(context):
    employee_details = {}
    for key, value in context.table:
        employee_details[key] = value
    api.add_rp14a_form(employee_details)
    context.nino = employee_details['employee_national_insurance_number']
def step(context):
    employee_details = {}
    for key, value in context.table:
        employee_details[key] = value
    api.add_rp14a_form(employee_details)
    context.nino = employee_details['employee_national_insurance_number']