예제 #1
0
파일: tests.py 프로젝트: adamfast/fccdata
    def test_kg0w_cancelled(self):
        en_parse = EN('EN|599000|||KG0W|L|L00268694|ETIENNE, ANTHONY J|ANTHONY|J|ETIENNE||||||OSCEOLA|NE|686510316|316||000|0003882503|I|||')
        en_parse.get_object().save()

        hd_obj = HD('HD|599000|9905170145||KG0W|C|HA|05/18/1999|04/30/2007|04/21/2003|||||||||||||||||||N||||||||||||||05/18/1999|12/09/2003||||||')
        self.assertEqual(hd_obj.unique_system_identifier, str(en_parse.get_object().unique_system_identifier))
        self.assertEqual(hd_obj.uls_file_number, '9905170145')
        self.assertEqual(hd_obj.call_sign, 'KG0W')
        self.assertEqual(hd_obj.license_status, 'C')
        self.assertEqual(hd_obj.radio_service_code, 'HA')
        self.assertEqual(hd_obj.grant_date, datetime.datetime(year=1999, month=5, day=18))
        self.assertEqual(hd_obj.expired_date, datetime.datetime(year=2007, month=4, day=30))
        self.assertEqual(hd_obj.cancellation_date, datetime.datetime(year=2003, month=4, day=21))
        self.assertEqual(hd_obj.effective_date, datetime.datetime(year=1999, month=5, day=18))
        self.assertEqual(hd_obj.last_action_date, datetime.datetime(year=2003, month=12, day=9))

        en_obj = en.objects.get(unique_system_identifier='599000')
        hd = hd_obj.get_object()
        self.assertEqual(hd.record_type, 'HD')
        self.assertEqual(hd.unique_system_identifier, en_obj)
        self.assertEqual(hd.uls_file_number, '9905170145')
        self.assertEqual(hd.call_sign, 'KG0W')
        self.assertEqual(hd.license_status, 'C')
        self.assertEqual(hd.radio_service_code, 'HA')
        self.assertEqual(hd.grant_date, datetime.datetime(year=1999, month=5, day=18))
        self.assertEqual(hd.expired_date, datetime.datetime(year=2007, month=4, day=30))
        self.assertEqual(hd.developmental_sta_demonstration, 'N')
        self.assertEqual(hd.certifier_first_name, '')
        self.assertEqual(hd.certifier_mi, '')
        self.assertEqual(hd.certifier_last_name, '')
        self.assertEqual(hd.effective_date, datetime.datetime(year=1999, month=5, day=18))
        self.assertEqual(hd.last_action_date, datetime.datetime(year=2003, month=12, day=9))
예제 #2
0
파일: tests.py 프로젝트: adamfast/fccdata
    def test_kg0w_active(self):
        en_parse = EN('EN|2867281|||KG0W|L|L00170412|KASSAWARA, MATTHEW S|MATTHEW|S|KASSAWARA|||||1681 W Canal Cir Unit 121|Littleton|CO|80120|||000|0002451524|I|||')
        en_parse.get_object().save()

        hd_obj = HD('HD|2867281|||KG0W|A|HV|12/15/2006|12/15/2016||||||||||||||||||||N||Matthew|S|Kassawara||||||||||08/31/2011|08/31/2011||||||')
        self.assertEqual(hd_obj.unique_system_identifier, str(en_parse.get_object().unique_system_identifier))
        self.assertEqual(hd_obj.uls_file_number, '')
        self.assertEqual(hd_obj.call_sign, 'KG0W')
        self.assertEqual(hd_obj.license_status, 'A')
        self.assertEqual(hd_obj.radio_service_code, 'HV')
        self.assertEqual(hd_obj.grant_date, datetime.datetime(year=2006, month=12, day=15))
        self.assertEqual(hd_obj.expired_date, datetime.datetime(year=2016, month=12, day=15))
        self.assertEqual(hd_obj.cancellation_date, None)
        self.assertEqual(hd_obj.effective_date, datetime.datetime(year=2011, month=8, day=31))
        self.assertEqual(hd_obj.last_action_date, datetime.datetime(year=2011, month=8, day=31))

        en_obj = en.objects.get(unique_system_identifier='2867281')
        hd = hd_obj.get_object()
        self.assertEqual(hd.record_type, 'HD')
        self.assertEqual(hd.unique_system_identifier, en_obj)
        self.assertEqual(hd.uls_file_number, '')
        self.assertEqual(hd.call_sign, 'KG0W')
        self.assertEqual(hd.license_status, 'A')
        self.assertEqual(hd.radio_service_code, 'HV')
        self.assertEqual(hd.grant_date, datetime.datetime(year=2006, month=12, day=15))
        self.assertEqual(hd.expired_date, datetime.datetime(year=2016, month=12, day=15))
        self.assertEqual(hd.developmental_sta_demonstration, 'N')
        self.assertEqual(hd.certifier_first_name, 'Matthew')
        self.assertEqual(hd.certifier_mi, 'S')
        self.assertEqual(hd.certifier_last_name, 'Kassawara')
        self.assertEqual(hd.effective_date, datetime.datetime(year=2011, month=8, day=31))
        self.assertEqual(hd.last_action_date, datetime.datetime(year=2011, month=8, day=31))
예제 #3
0
파일: tests.py 프로젝트: adamfast/fccdata
    def test_kc0ylk(self):
        # get set up
        en_parse = EN('EN|2840548|||KC0YLK|L|L00615690|Fast, Adam G|Adam|G|Fast|||||1501 George Williams Way Apt. F9|Lawrence|KS|66047|||000|0008178568|I|||')
        en_parse.get_object().save()

        hd_obj = HD('HD|2840548|0004374840||KC0YLK|A|HA|08/31/2006|08/31/2016||||||||||||||||||||N||Adam|G|Fast||||||||||09/02/2010|09/02/2010||||||')
        hd_obj.get_object().save()
        self.assertEqual(hd_obj.unique_system_identifier, str(en_parse.get_object().unique_system_identifier))
        self.assertEqual(hd_obj.uls_file_number, '0004374840')
        self.assertEqual(hd_obj.call_sign, 'KC0YLK')
        self.assertEqual(hd_obj.license_status, 'A')
        self.assertEqual(hd_obj.radio_service_code, 'HA')
        self.assertEqual(hd_obj.grant_date, datetime.datetime(year=2006, month=8, day=31))
        self.assertEqual(hd_obj.expired_date, datetime.datetime(year=2016, month=8, day=31))
        self.assertEqual(hd_obj.cancellation_date, None)
        self.assertEqual(hd_obj.effective_date, datetime.datetime(year=2010, month=9, day=2))
        self.assertEqual(hd_obj.last_action_date, datetime.datetime(year=2010, month=9, day=2))

        en_obj = en.objects.get(unique_system_identifier='2840548')
        hd = hd_obj.get_object()
        self.assertEqual(hd.record_type, 'HD')
        self.assertEqual(hd.unique_system_identifier, en_obj)
        self.assertEqual(hd.uls_file_number, '0004374840')
        self.assertEqual(hd.call_sign, 'KC0YLK')
        self.assertEqual(hd.license_status, 'A')
        self.assertEqual(hd.radio_service_code, 'HA')
        self.assertEqual(hd.grant_date, datetime.datetime(year=2006, month=8, day=31))
        self.assertEqual(hd.expired_date, datetime.datetime(year=2016, month=8, day=31))
        self.assertEqual(hd.developmental_sta_demonstration, 'N')
        self.assertEqual(hd.certifier_first_name, 'Adam')
        self.assertEqual(hd.certifier_mi, 'G')
        self.assertEqual(hd.certifier_last_name, 'Fast')
        self.assertEqual(hd.effective_date, datetime.datetime(year=2010, month=9, day=2))
        self.assertEqual(hd.last_action_date, datetime.datetime(year=2010, month=9, day=2))