def test_str_format_err(self): """Test missing properties""" time = datetime(2014, 01, 29, 12, 13, 14) header = _ChangelogHeader(RpmPkgPolicy, time, name="John", revision="1") assert_raises(ChangelogError, str, header) """
def test_str_format(self): """Basic test for header""" time = datetime(2014, 01, 29, 12, 13, 14) header = _ChangelogHeader(RpmPkgPolicy, time, name="John Doe", email="*****@*****.**", revision="1") eq_(str(header), "* Wed Jan 29 2014 John Doe <*****@*****.**> 1\n")
def test_container(self): """Test the container methods of the class""" header = _ChangelogHeader(RpmPkgPolicy, datetime(2014, 1, 1), name="N", revision="1") # Test __getitem__() eq_(header['name'], "N") eq_(header['email'], None) # Test __contains__() ok_('name' in header) ok_('foo' not in header)
def test_str_format_err(self): """Test missing properties""" time = datetime(2014, 1, 29, 12, 13, 14) header = _ChangelogHeader(RpmPkgPolicy, time, name="John", revision="1") with assert_raises(ChangelogError): str(header)
def test_str_format(self): """Basic test for header""" time = datetime(2014, 1, 29, 12, 13, 14) header = _ChangelogHeader(RpmPkgPolicy, time, name="John Doe", email="*****@*****.**", revision="1") eq_(str(header), "* Wed Jan 29 2014 John Doe <*****@*****.**> 1\n")