Exemple #1
0
    def test_multi_release_sorts(self, mock_json_func):
        expected = {'1.0': 'a', '1.5': '', '2.0': '1', '3.1': 'a'}
        response = vanity.get_jsonparsed_data('fake url')

        mock_json_func.assert_called_with('fake url')
        self.assertEqual(response['releases'], expected)
Exemple #2
0
    def test_single_release(self, mock_json_func):
        expected = {'1.0': ''}
        response = vanity.get_jsonparsed_data('fake url')

        mock_json_func.assert_called_with('fake url')
        self.assertEqual(response['releases'], expected)
Exemple #3
0
    def test_single_release(self, mock_json_func):
        expected = {'1.0': ''}
        response = vanity.get_jsonparsed_data('fake url')

        mock_json_func.assert_called_with('fake url')
        self.assertEqual(response['releases'], expected)
Exemple #4
0
    def test_multi_release_sorts(self, mock_json_func):
        expected = {'1.0': 'a', '1.5': '', '2.0': '1', '3.1': 'a'}
        response = vanity.get_jsonparsed_data('fake url')

        mock_json_func.assert_called_with('fake url')
        self.assertEqual(response['releases'], expected)