예제 #1
0
 def new_model(self) -> str:
     return barcode.textify(self.model_name) + barcode.tabify(2) + barcode.delayify(
         self.model_identifier)
예제 #2
0
 def new_asset(self, asset_tag, user, form_type) -> str:
     status = 'Ready'
     return (
         barcode.textify(asset_tag) + barcode.listify(self.model_identifier) + self.get_asset_sequence(form_type)
         + barcode.listify(status) + self.get_user_sequence(user) + barcode.delayify(self.serial_number)
     )
예제 #3
0
def test_barcode_data_delayify_long():
    assert barcode.delayify('foo', 2) == '~d~dfoo'
예제 #4
0
 def get_user_sequence(self, user) -> str:
     try:
         user_sequence = [barcode.SPACE, '({})'.format(user), barcode.ENTER, barcode.TAB]
         return ''.join([barcode.delayify(char) for char in user_sequence])
     except TypeError('User entry is required.'):
         sys.exit(1)
예제 #5
0
def test_barcode_data_delayify():
    assert barcode.delayify('foo') == '~dfoo'