Have a 'django' class that acts as topic #2

Closed
opened 2011-05-06 12:55:15 +00:00 by heynemann · 0 comments
heynemann commented 2011-05-06 12:55:15 +00:00 (Migrated from github.com)

I think it would be very cool to have a django item in context like this:

from django_pyvows import DjangoContext, Assertions

class UrlsContext(DjangoContext):
    def topic(self):
        return self.django

    def should_have_home_url(self, topic):
        expect(topic).to_map('/home')

    class HomeViewContext(DjangoContext):
        def home_url(self):
            return self.django.urls['/home']

        def should_map_to_home_view(self, topic):
            expect(topic).to_map_to_view(home)
I think it would be very cool to have a django item in context like this: ``` from django_pyvows import DjangoContext, Assertions class UrlsContext(DjangoContext): def topic(self): return self.django def should_have_home_url(self, topic): expect(topic).to_map('/home') class HomeViewContext(DjangoContext): def home_url(self): return self.django.urls['/home'] def should_map_to_home_view(self, topic): expect(topic).to_map_to_view(home) ```
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archive/django-pyvows#2
No description provided.