-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor naming and code style
stroyprombeton/tests/tests_views.py
Outdated
self.assertIsInstance(self.context['products'], models.OptionQuerySet) | ||
self.assertGreater(self.context['products'].count(), 100) | ||
|
||
def test_tags_group(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_tags_group(self): | |
def test_tags_are_grouped(self): |
And we can get rid of additional comment
stroyprombeton/tests/tests_views.py
Outdated
self.assertEqual(group, tag_.group) | ||
|
||
# it is products' tags | ||
_, grouped_tags = zip(*self.context['group_tags_pairs']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_, grouped_tags = zip(*self.context['group_tags_pairs']) | |
grouped_tags = [tags for _, tags in self.context['group_tags_pairs'] |
Would be more readable in my taste.
or even the whole expression
tags = set([t for tags for _, tags in self.context['group_tags_pairs'] for t in tags])
Up to you
@artemiy312 , let me comment on our microtasking style. Here you've done contexts refactoring which has nothing common with solving issue with pdf price list. What seems to me as more clear decision:
It's doesn't matter in this concrete case, but we should develop solid microtasking style for the future 💪 |
3e1cde1
to
5bba954
Compare
Closes #744