예제 #1
0
    def test_returns_value_when_resolved_path_equals_current_path(self):
        return_value = ' active'
        returned_value = current({'request': self.request}, self.url_name)
        self.assertEquals(return_value, returned_value)

        return_value = 'test'
        returned_value = current({'request': self.request}, self.url_name,
                                 return_value)
        self.assertEquals(return_value, returned_value)
예제 #2
0
파일: tests.py 프로젝트: muchas/graduates
    def test_returns_value_when_resolved_path_equals_current_path(self):
        return_value = ' active'
        returned_value = current({'request': self.request}, self.url_name)
        self.assertEquals(return_value, returned_value)

        return_value = 'test'
        returned_value = current({'request': self.request},
                                 self.url_name, return_value)
        self.assertEquals(return_value, returned_value)
예제 #3
0
 def test_returns_empty_string_when_current_path_is_not_resolved(self):
     return_value = ''
     request = mock.Mock
     request.path = '/invalid-!@#-path'
     returned_value = current({'request': request}, 'test')
     self.assertEquals(return_value, returned_value)
예제 #4
0
 def test_returns_empty_string_when_resolved_path_not_equals_current_path(
         self):
     return_value = ''
     returned_value = current({'request': self.request}, 'not_login')
     self.assertEquals(return_value, returned_value)
예제 #5
0
파일: tests.py 프로젝트: muchas/graduates
 def test_returns_empty_string_when_current_path_is_not_resolved(self):
     return_value = ''
     request = mock.Mock
     request.path = '/invalid-!@#-path'
     returned_value = current({'request': request}, 'test')
     self.assertEquals(return_value, returned_value)
예제 #6
0
파일: tests.py 프로젝트: muchas/graduates
 def test_returns_empty_string_when_resolved_path_not_equals_current_path(self):
     return_value = ''
     returned_value = current({'request': self.request}, 'not_login')
     self.assertEquals(return_value, returned_value)