Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

src/d/j/django-configglue-0.7.1/django_configglue/tests/test_settings.py   django-configglue(Download)
    def test_no_args(self):
        self.call_command()
        self.assertTrue(self.output.startswith('Usage: '))
 
    def test_get(self):
        except (SystemExit, CommandError), e:
            error_msg = 'Settings did not validate against schema.'
            self.assertTrue((error_msg in self.output.strip()) or
                            error_msg in str(e))
 
    def test_help(self):
        self.call_command()
        self.assertTrue('--django_debug' in self.output)
 
    def test_update_settings(self):
        self.assertTrue(settings.DEBUG)
        finally:
            self.end_capture()
        self.assertTrue('False' in self.output)
 
    def test_version_is_printed_once(self):

src/d/j/django-configglue-0.7.1/django_configglue/tests/test_configglue.py   django-configglue(Download)
            pass
        self.assertTrue(
            "Type '%s help <subcommand>' for help" % (self.util.prog_name,) in
            self.output)
 
            # In earlier versions than 1.4, help was raising SystemExit
            pass
        self.assertTrue(self.util.main_help_text() in self.output)
 
    @patch('sys.stdout')
    def test_execute_help_option(self, mock_stdout):
        mock_stdout.isatty.return_value = False
        self.util.argv = ['', '--help']
        self.execute()
        self.assertTrue(self.util.main_help_text() in self.output)
    def test_execute_help_for_command(self):
        self.util.argv = ['', 'help', 'settings']
        self.execute()
        self.assertTrue('Show settings attributes' in self.output)
 
    def test_execute_version(self):
        from django import get_version
        self.util.argv = ['', '--version']
        self.execute()
        self.assertTrue(get_version() in self.output)