Exemple #1
0
 def test_list_files(self, mock_requests):
     try:
         mock_requests.get.side_effect = Timeout
         with self.assertRaises(Timeout):
             list_files(BUCKET)
             mock_requests.get.assert_called_once()
     except Exception as e:
         print(e)
Exemple #2
0
def save_feed():
    if request.method == 'POST':
        correct_label = str(request.form.get('comp_select'))
        feedfile = open("flask-drive/feed/user.csv", "a")
        with feedfile:
            writer = csv.writer(feedfile)
            writer.writerow(correct_label)
    contents = list_files("flaskdrive")
    return render_template('storage.html',
                           msg="Feedback send! Retry it!",
                           contents=contents)
Exemple #3
0
def storage():
    contents = list_files("flaskdrive")
    return render_template('storage.html', contents=contents)
Exemple #4
0
def storage():
    contents = list_files(BUCKET)
    return render_template('storage.html', contents=contents)
Exemple #5
0
 def test_list_files(self):
     contents= []
     contents= list_files(MY_BUCKET)
     'return contents'
     for i in contents:
         print (i)
Exemple #6
0
def storage():
    contents = list_files("rahulb-test-bucket")
    return render_template('storage.html', contents=contents)