Skip to content

Commit

Permalink
Renamed module to barcode
Browse files Browse the repository at this point in the history
  • Loading branch information
benhovinga committed May 12, 2024
1 parent 5602a02 commit c33d06e
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions tests/barcode/test__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

import aamva.barcode_file as barcode_file
import aamva.barcode as barcode

testdata_ids = ("AAMVA Version 1", "AAMVA Version 10")
testdata = (
Expand All @@ -16,15 +16,15 @@
("DL", 39, 187),
("ZV", 226, 32)
),
barcode_file.BarcodeFile(
header=barcode_file.FileHeader(
barcode.BarcodeFile(
header=barcode.FileHeader(
issuer_id=636000,
aamva_version=1,
jurisdiction_version=0,
number_of_entries=2
),
subfiles=(
barcode_file.Subfile(
barcode.Subfile(
"DL",
{
"DAQ": "0123456789ABC",
Expand All @@ -46,7 +46,7 @@
"DBD": "19961201"
}
),
barcode_file.Subfile(
barcode.Subfile(
"ZV",
{
"ZVA": "JURISDICTIONDEFINEDELEMENT"
Expand All @@ -67,15 +67,15 @@
("DL", 41, 278),
("ZV", 319, 8)
),
barcode_file.BarcodeFile(
header=barcode_file.FileHeader(
barcode.BarcodeFile(
header=barcode.FileHeader(
issuer_id=636000,
aamva_version=10,
jurisdiction_version=1,
number_of_entries=2
),
subfiles=(
barcode_file.Subfile(
barcode.Subfile(
"DL",
{
"DAC": "MICHAEL",
Expand Down Expand Up @@ -108,7 +108,7 @@
"DDG": "N"
}
),
barcode_file.Subfile(
barcode.Subfile(
"ZV",
{
"ZVA": "01"
Expand All @@ -122,11 +122,11 @@

@pytest.mark.parametrize("test_string, _, expects", testdata, ids=testdata_ids)
def test_can_parse_barcode_file(test_string, _, expects):
assert barcode_file.BarcodeFile.parse(test_string) == expects
assert barcode.BarcodeFile.parse(test_string) == expects


def test_parse_raises_value_error_number_of_entries_cannot_be_less_than_1():
with pytest.raises(
ValueError,
match="number of entries cannot be less than 1"):
barcode_file.BarcodeFile.parse("@\n\x1e\rANSI 6360000100")
barcode.BarcodeFile.parse("@\n\x1e\rANSI 6360000100")
2 changes: 1 addition & 1 deletion tests/barcode/test_file_header.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

import aamva.barcode_file.file_header as file_header
import aamva.barcode.file_header as file_header
import aamva.errors as errors


Expand Down
2 changes: 1 addition & 1 deletion tests/barcode/test_subfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

import aamva.barcode_file.subfile as subfile
import aamva.barcode.subfile as subfile


testdata_ids = ("1 element", "multi element", "multi element with empty")
Expand Down
2 changes: 1 addition & 1 deletion tests/barcode/test_subfile_designator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

import aamva.barcode_file.subfile_designator as subfile_designator
import aamva.barcode.subfile_designator as subfile_designator


valid_testdata_ids = ("AAVMA Version 1", "AAMVA Version 10")
Expand Down
2 changes: 1 addition & 1 deletion tests/barcode/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

import aamva.barcode_file.utils as utils
import aamva.barcode.utils as utils


def test_can_trim_before():
Expand Down

0 comments on commit c33d06e

Please sign in to comment.