Skip to content

Commit

Permalink
Rename CharterGroup class
Browse files Browse the repository at this point in the history
  • Loading branch information
yngwi committed Jan 31, 2022
1 parent 93d2369 commit 420c3be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# This call to setup() does all the work
setup(
name="to_cei",
version="0.1.1",
version="0.1.2",
description="to-CEI",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
8 changes: 4 additions & 4 deletions test/test_charter_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
from lxml import etree

from to_cei.charter import Charter
from to_cei.charter_group import Charter_group
from to_cei.charter_group import CharterGroup
from to_cei.validator import Validator


def test_is_valid_cei():
group = Charter_group("Charter group", [Charter("1A"), Charter("1b")])
group = CharterGroup("Charter group", [Charter("1A"), Charter("1b")])
Validator().validate_cei(group.to_xml())


def test_writes_correct_file(tmp_path):
d = tmp_path
group = Charter_group("Charter group", [Charter("1A"), Charter("1b")])
group = CharterGroup("Charter group", [Charter("1A"), Charter("1b")])
group.to_file(d)
out = pathlib.Path(d, "charter_group.cei.group.xml")
assert out.is_file()
Expand All @@ -25,4 +25,4 @@ def test_writes_correct_file(tmp_path):

def test_raises_exception_for_empty_name():
with pytest.raises(ValueError):
Charter_group("")
CharterGroup("")
4 changes: 2 additions & 2 deletions to_cei/charter_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from to_cei.xml_assembler import XmlAssembler


class Charter_group(XmlAssembler):
class CharterGroup(XmlAssembler):
_charters: List[Charter] = []
_name: str = ""

Expand Down Expand Up @@ -47,6 +47,6 @@ def to_xml(self) -> etree._Element:
return xml

def to_file(self, folder: str = None):
return super(Charter_group, self).to_file(
return super(CharterGroup, self).to_file(
self.name.lower().replace(" ", "_") + ".cei.group", folder=folder
)

0 comments on commit 420c3be

Please sign in to comment.