Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
fix for auto id bug - verifying test is now passing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbashdown committed Sep 23, 2014
1 parent fe71e84 commit d8e0022
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backdrop/core/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _generate_auto_id(record, auto_id_keys):
', '.join(missing_keys)))

return b64encode('.'.join(
record[key] for key in auto_id_keys))
str(record[key]) for key in auto_id_keys))


def parse_timestamp(record):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test__generate_auto_id_generates_auto_ids_correctly_for_standard_case(self):
assert_that(_generate_auto_id({'foo': 'foo'}, ['foo']), is_('Zm9v'))

def test__generate_auto_id_generates_auto_ids_correctly_for_integers(self):
assert_that(_generate_auto_id({'foo': 1}, ['foo']), is_('Zm9v'))
assert_that(_generate_auto_id({'foo': 1, 'bar': 'foo'}, ['foo', 'bar']), is_('MS5mb28='))

def test__generate_auto_id_throws_error_when_key_not_matched(self):
assert_raises(
Expand Down

0 comments on commit d8e0022

Please sign in to comment.